Run commands on Windows invisibly
This is a very simple vbs script that runs the batch script or command passed to it without anything appearing on screen. If you put it in a folder and add the folder to you user PATH, you can use it as follows:
invisible assoc
invisible echo hello
invisible <command> <with> <args> <"as you'd usually enter it in command line">
You can also do:
"C:\path\to\invisible.vbs" invisible <command> <with> <args> <"as you'd usually enter it in command line">
Personally I use it this way so I can create shortcuts to batch scripts and run them invisibly, then put the shortcuts somewhere useful like in the "Send to" directory.
I wanted to run batch command without a window appearing. Honestly it seems like something like this should be included in command prompt, so I was surprised to find a relative lack of solutions online. I found a couple solutions online, but none were sufficient. A couple places had a version of invisible.vbs, but the way it accepted the command didn't allow for arguments, at least not simply. So I made this.
I haven't tested this outside of my PC, but I expect it should work on any windows machine that can run .vbs's. If run with no arguments vbs will send you an error message (in an uglopuy pp).
This is my first vbs script ever, I made it just because I couldn't find another way to accomplish this. Any feedback is welcome.