
Passing values to a .VBS file...
Pass arguments via the normal command line as space separated values. If an argument includes a space, included it in quotes (note that you can't embedded or include quotes in an argument as in the "z ""a"" p" below. If you use switches, use /sw or -sw style. Any // sequence is reserved for host switches like the debugging x and d switches.
myscript.vbs abc "x y z" foo "bar" "z ""a"" p"
=== myscript.vbs ===
'count 1-based
msgbox wscript.arguments.count & " arguments passed"
'indexing is 0-based
if wscript.arguments.count > 0 then
'note what happened to "z ""a"" p"
msgbox "first argument is: " & wscript.arguments(0)
end if
for each arg in wscript.arguments
msgbox arg
next
--
Michael Harris
How can I pass parameters to a VBScript file through a shortcut in Windows?
Thanks,
</Connick>