I\'ve two VB Scripts. Say First.vbs and Second.vbs.
Frist.vbs calls Second.vbs each time some action/
The value of param2
contains a space and you didn't put the parameter between double quotes. Because of that your Run
command-line effectively has 3 arguments:
To avoid that add double quotes around your second argument:
objShell.Run "Second.vbs" & " " & param1 & " """ & param2 & """"
Better yet, quote all arguments and use a quoting function so you don't drown in double quotes:
Function qq(str)
qq = Chr(34) & str & Chr(34)
End Function
objShell.Run "Second.vbs" & " " & qq(param1) & " " & qq(param2)