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 Fri Mar 29, 2024 7:36 am

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
PostPosted: Tue Nov 30, 2010 12:37 pm 
Offline
Newbie

Joined: Tue Nov 30, 2010 11:55 am
Posts: 2
I noticed that running "cscript audit.vbs ." did not yield any scheduled tasks. Strange, because I run the script as a scheduled task. What I found out is that the temporary file wasn't filled. It appears the variable strComputer is best replaced with system_name. This works for running "cscript audit.vbs .". I haven't tested the change in scenarios where a computer name is supplied

I changed:
sCmd = "%ComSpec% /c schtasks.exe /query /v /nh /fo csv /s " & strComputer
into:
sCmd = "%ComSpec% /c schtasks.exe /query /v /nh /fo csv /s " & system_name

and changed:
if UCase(sTask(0)) = UCase(strComputer) then
into:
if UCase(sTask(0)) = UCase(system_name) then


and the script works ok.


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 11, 2011 7:29 am 
Offline
Contributor

Joined: Wed Apr 07, 2010 8:04 am
Posts: 105
Location: Boston, MA
I also removed the /NH parameter from schtasks.exe in audit.vbs and Win7 tasks started showing on my inventory.
Thanks

_________________
Old OA Setup: 500 Windows 7 workstations & 200 Apple OSX with OA v1.5.2 on Windows Server 2003 and WAMP 2
New OA Setup: 100 Windows servers with OA 2.2 on Windows Server 2016 and WAMP 3


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.  [ 2 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:  
Powered by phpBB® Forum Software © phpBB Group