Answers for "vbscript run program"

VBA
0

vbs run with cscript

Set oShell = CreateObject("WScript.Shell")

If Not LCase(Right(WScript.FullName, 12)) = "cscript.exe" Then
  For Each Arg In WScript.Arguments
    If InStr(Arg, " ") Then Arg = """" & Arg & """"
      Str = Str & " " & Arg
  Next
  cmd = "cscript //nologo """ & WScript.ScriptFullName & """ " & Str
  oShell.Run cmd, 0, false
  WScript.Quit
End If
Posted by: Guest on August-17-2020

Code answers related to "VBA"

Browse Popular Code Answers by Language