Function EnquoteString(argument)
EnquoteString = Chr(34) & argument & Chr(34)
End Function
arglist = ""
With WScript.Arguments
For Each arg In .Unnamed
' Wscript.Echo "Unnamed: " & arg
If InStr(arg, " ") > 0 Then
' arg contains a space
arglist = arglist & " " & EnquoteString(arg)
Else
arglist = arglist & " " & arg
End If
Next
End With
CreateObject("Wscript.Shell").Run Trim( arglist ), 0, False