Skip to content

Instantly share code, notes, and snippets.

@jonschoning
Created January 4, 2012 07:15
Show Gist options
  • Save jonschoning/1558919 to your computer and use it in GitHub Desktop.
Save jonschoning/1558919 to your computer and use it in GitHub Desktop.
invis.vbs
set args = WScript.Arguments
num = args.Count
if num = 0 then
WScript.Echo "Usage: [CScript | WScript] invis.vbs aScript.bat <some script arguments>"
WScript.Quit 1
end if
sargs = ""
if num > 1 then
sargs = " "
for k = 1 to num - 1
anArg = args.Item(k)
sargs = sargs & anArg & " "
next
end if
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run """" & WScript.Arguments(0) & """" & sargs, 0, False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment