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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Execute a batch file 1

Status
Not open for further replies.

m2t9664

Technical User
Dec 7, 2003
5
CA
I'm trying to execute a batch file using VBScript what command can I use?
 
Set SH = CreateObject("WScript.Shell")
SH.Run "%comspec% /c drive:\path\batchname.bat", 0, true
Set SH = Nothing

This will launch it in the background and pause script execution while it runs. To see the window as it runs change 0 to 1. To let the script continue while that batch runs, change true to false.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top