Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save avalon1610/361a58e00b14600d476b80b201206bed to your computer and use it in GitHub Desktop.
Save avalon1610/361a58e00b14600d476b80b201206bed to your computer and use it in GitHub Desktop.

Revisions

  1. avalon1610 created this gist May 4, 2018.
    10 changes: 10 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    // from "https://superuser.com/a/62646"

    // Save this one line of text as file invisible.vbs:
    CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False

    // To run any program or batch file invisibly, use it like this:
    wscript.exe "C:\Wherever\invisible.vbs" "C:\Some Other Place\MyBatchFile.bat"

    // To also be able to pass-on/relay a list of arguments use only two double quotes
    CreateObject("Wscript.Shell").Run "" & WScript.Arguments(0) & "", 0, False