Re: Task scheduler won't execute vbs
I have a similar problem. Server 2008 x86. I have a scheduled task (user is logged off) .cmd file that runs a net time command on a remote machine and puts the output in a text file. Then it does a cscript on a .vbs that opens excel and writes information about the remote machine to the spreadsheet.
This has been working for several years under XP and server 2003, but under 2008, the the .vbs to run excel will not run with the user logged off.
Any help would be appreciated
Re: Task scheduler won't execute vbs
It might be possible that you have got the profile corrupted and that is why you are getting the issue with the same if this is the case then i will advise you to create a new profile and see whether this is working with the issue of yours or not. After creating the new profile just copy the old file to the new profile and run the task scheduler to run the .vbs file.
Re: Task scheduler won't execute vbs
I had the same problem and resolved it.
I believe that the task failsbecause the scheduled task doesn't know how to execute the .vbs. That is, at a command prompt you normally would use:
cscript.exe program.vbs or wscript.exe program.vbs
Therefore:
For Win2k+ in the task you put "c:\windows\system32\cscript.exe c:\folder\program.vbs" instead of just "c:\folder\program.vbs".
For windows 2008+, you just put "c:\windows\system32\cscript.exe" as the program and "c:\folder\program.vbs" as the parameter to be passed to it.
Re: Task scheduler won't execute vbs
Maybe UAC is getting in the way?
Is there a problem in Win 2003?
Re: Task scheduler won't execute vbs
Well I want you to use this command : “cscript yourscript.vbs” and see how the things goes I hope that you will not face any issues further. And also the main thing here is that there is nothing to deal with UAC which you have mentioned.