Registrations to Open-AudIT forums are now closed. To ask any new questions please visit Opmantek Community Questions.

Open-AudIT

What's on your network?
It is currently Tue Apr 16, 2024 5:33 pm

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
PostPosted: Sat Aug 11, 2012 9:22 am 
Offline
Newbie

Joined: Fri Aug 10, 2012 7:33 am
Posts: 5
This system is showing up as a printer in OAv2

[img]http://omahax.com/img/OAv2/2192.png[/img]
[img]http://omahax.com/img/OAv2/aw2192.png[/img]

The same audit_windows_v10.vbs works on other system.


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 14, 2012 12:45 am 
Offline
Newbie

Joined: Fri Aug 10, 2012 7:33 am
Posts: 5
This was ran on 57 systems all seem to work except two. They get this same error.

[img]http://omahax.com/img/OAv2/mattcauditerror.png[/img]

Any clue as to why?


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 14, 2012 1:16 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
I don't think IsEmpty works in this instance at 2188. The ExecQuery is returning an empty collection which is always false for IsEmpty. Change the following and see what happens:

Line 2188 from:
[code]if IsEmpty(colItems2) then[/code]

to:
[code]if colItems2.Count = 0 then[/code]
Mark will need to go through the code and look for more of these IsEmpty tests if this fixes your problem.

Maybe it should be a combination of IsEmpty and testing for zero length collection.


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 14, 2012 2:39 am 
Offline
Newbie

Joined: Fri Aug 10, 2012 7:33 am
Posts: 5
Commenting out the if statement seems to have worked.
[img]http://omahax.com/img/OAv2/cout.png[/img]

Changing the IsEmpty did not solve the problem.
[img]http://omahax.com/img/OAv2/2188.png[/img]


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 14, 2012 2:57 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
If you're willing could you try one other thing.

Paste the following at the end of the audit_windows.vbs file. It's a function to test for empty collections. [url=http://softimage.wiki.softimage.com/sdkdocs/script_data_MakingSureReturnedValuesareValid.htm]Sourced from here[/url].

[code]Function IsCollectionEmpty( in_collection )
If TypeName( in_collection ) <> "Nothing" Then
If in_collection.Count > 0 Then
IsCollectionEmpty = false
Else
IsCollectionEmpty = true
End If
Else
IsCollectionEmpty = true
End If
End Function[/code]

Then change the if test at line 2188 to
[code]if IsCollectionEmpty(colItems2) then[/code]
and let us know what happens.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group