Skip to content

Instantly share code, notes, and snippets.

@olegchir
Created September 5, 2017 09:45
Show Gist options
  • Save olegchir/f2358d6cdede44d0d95bc3fc2288ae9e to your computer and use it in GitHub Desktop.
Save olegchir/f2358d6cdede44d0d95bc3fc2288ae9e to your computer and use it in GitHub Desktop.
If WScript.Arguments.Count >= 1 Then
ReDim arr(WScript.Arguments.Count-1)
For i = 0 To WScript.Arguments.Count-1
Arg = WScript.Arguments(i)
If InStr(Arg, " ") > 0 Then Arg = """" & Arg & """"
arr(i) = Arg
Next
RunCmd = Join(arr)
CreateObject("Wscript.Shell").Run RunCmd, 0, True
End If
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment