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

need to run a VBscript file from a VBscript command

Status
Not open for further replies.

lecan

Programmer
Jul 2, 2003
2
US
Hi,

I wanted to know if there is any way I can run a VBscript stored in the .vbs file from a single VBScript command. Is there something like "run X.X" or something that would do that ?

thanks for your help
 
Good question! I spent all day yesterday trying to find the answer to no avail. Shelling out wouldn't work for me either. So I ended up just combining the scripts. Hope someone answers this with a favorable reply:) [bigears]

 
Try something like this:
Code:
Set Sh=WScript.CreateObject("WScript.Shell")
ReturnCode=Sh.Run("cscript \path\to\script.vbs",1,True)
You can replace cscript by wscript if you want GUI.


Hope This Help
PH.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top