I\'m using CScript to run a VBScript file, and I need to pass a command line to the script where the parameter includes both spaces and quotes. The entire command needs to
It appears like you are trying to delineate values in your parameters. I suggest using something besides quotes and adding back the quotes. For example using tildes:
Dim count
For count = 0 To WScript.Arguments.Count-1
WScript.Echo CStr(count) & " = " & replace(WScript.Arguments.Item(count),"~",chr(34))
Next
Passing:
cscript myscript.vbs //Nologo "1 ~2 3~"
0 = 1 "2 3"