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

call .vbs file with parameter!

Status
Not open for further replies.

Sasquatch69

Programmer
Sep 20, 2002
19
CA
Hi,
I need to call .vbs file with parameter. I call this .vbs file in a batch file. Anyone know how can i do this???
 
easy.

wscript.exe filetorun.vbs someparm1 someparm2
you may have to use
wscript.exe "filetorun.vbs someparm1 someparm2"

use the wscript.arguments object...
Code:
Dim oArgs
Dim i
Set oArgs = WScript.Arguments
For i = 0 to oArgs.Count - 1
   WScript.Echo oArgs(I)
Next

HTH, Rob
robschultz@yahoo.com
-Focus on the solution to the problem, not the obstacles in the way.-
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top