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
|