tags:

views:

200

answers:

2

how to pass and access command line arguments in VBscript

+2  A: 

There's a MSDN page which describes that.

http://technet.microsoft.com/en-us/library/ee156618.aspx

Ikke
+2  A: 
Set args = Wscript.Arguments

For Each arg In args
  Wscript.Echo arg
Next

From a command prompt, run the script like this:

CSCRIPT MyScript.vbs 1 2 A B "Arg with spaces"

Will give results like this:

1
2
A
B
Arg with spaces
aphoria