Open-AudIT
http://www.open-audit.org/phpBB3/

Scheduled Tasks empty Vista
http://www.open-audit.org/phpBB3/viewtopic.php?f=8&t=3902
Page 1 of 1

Author:  ErikD [ Wed Dec 01, 2010 4:46 am ]
Post subject:  Scheduled Tasks empty Vista

Reported as a bug in Vista, the command in schtasks.exe /query /v /fo csv /s in audit.vbs generates and error commenting that option /nh is not valid for List. Funny, because you are not requesting a list but a csv file.

I got it running again by removing the /nh option from the command, and adding a counter, and a statement that removes the 1st line of the temp .csv file that contains all scheduled tasks

Like so:
icounter=0 'added to counter the VIsta /nh bug
Do While Not oTF.AtEndOfStream
sLine = oTF.Readline
if icounter>0 then 'added to counter the VIsta /nh bug, removes header line
if sLine <> "" Then
' Parse the line
...
end If
end if 'added to counter the VIsta /nh bug
icounter=icounter+1 'added to counter the VIsta /nh bug
Loop

Page 1 of 1 All times are UTC + 10 hours
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/