I use a lot of batch files, command line applications, and even Ruby scripts (which run from the command line). One of the things that has always irritated me is the flashing command prompt window when I make a shortcut for a batch file, especially when I put it into the startup folder to run when I first login.
There’s a really useful utility that you can use called Hidden Start (hstart), which will start up a command line application hidden in the background, which eliminates the flashing window.
If you launch the utility with no parameters, it will pop up the settings dialog.
When using this utility, there are three key things to remember: Use the /NOWINDOW parameter to keep the window hidden, use the /D=path argument to make sure that the current directory is set correctly, and make sure to surround your application argument with quotes.
For instance, if I had a batch file stored in c:\scripts\mybatch.bat, I would start it by using the following parameters in my shortcut:
hstart /NOWINDOW /D=c:\scripts “c:\scripts\mybatch.bat”
You’ll probably want to copy hstart.exe into somewhere in the system path, for instance C:\windows might work nicely.
- › 20 of the Best Tips and Tricks for Getting the Most out of the Windows Command Line
- › Create a Shortcut Icon or Hotkey to Turn Windows 7 / Vista Firewall On or Off
- › This Is How Steve Jobs Killed Adobe Flash
- › What Do “FR” and “FRFR” Mean?
- › The Origins of Ctrl+C, Ctrl+V, Ctrl+X, and Ctrl+Z Explained
- › 10 Things Blocking Your Wi-Fi Signal at Home
- › AMD’s Ryzen 7000 Series Are the First 5nm Desktop CPUs Ever
- › How to Make Your Facebook Account More Private