Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running a VBScript from the Windows Scheduler? 1

Status
Not open for further replies.

Ati2ude

Programmer
Dec 11, 2001
79
US
Has anyone ever had to run a VBS from the Windows Scheduler? If so can you give some pointers?

Thanks in advance,
Ati2ude
 
Sorry, but where is a problem ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I am having problems making the script execute at all. Do I need to call the wscript.exe before calling my script? i.e.. c:\windows\system32\wscript.exe myscript.vbs

Thanks
 
i schedule vb scripts to run via scheduler. just go to control panel / scheduled takes / add / browse to the folder that contains the vbs, and it should run. i never had any problem with it.
 
Barny

Do you have any with ARGS?

i.e.. myscript.vbs arg1 arg2 etc...
 
arg as in pirates? lol - just kidding.
like input box or args in a text file or something?
i like to see the code.
 
You essentially need to place wscript/cscript in front of your script.

So when you create your scheduled task browse to %systemdrive%\Windows\system32\ and select cscript.exe OR wscript.exe

Set schedule etc

Go back edit the task and in the Run field, add your script after cscript.exe - so it will look like

"%systemdrive\Windows\system32\wscript.exe yourscript.vbs" (or whatever the path is to your script and whatever args you have)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top