LOGO

Hide Command Prompt & Batch File Windows on Startup

March 15, 2007
Hide Command Prompt & Batch File Windows on Startup

Eliminating the Flashing Command Prompt Window

Many users, including myself, frequently utilize batch files, command-line applications, and scripting languages like Ruby – often executed directly from the command line. A common annoyance is the brief, distracting flash of the command prompt window when launching these applications via shortcuts.

This is particularly noticeable when placing shortcuts in the startup folder, intended to run automatically upon login. Fortunately, a valuable tool called Hidden Start (hstart) provides a solution.

How Hidden Start Works

hstart is designed to launch command-line applications in a hidden state, effectively eliminating the flashing window issue. Executing the utility without any arguments will display its configuration dialog.

When employing hstart, three crucial parameters should be kept in mind for optimal functionality:

  • /NOWINDOW: This parameter is essential for suppressing the command prompt window.
  • /D=path: Specifying the current directory using this argument ensures the application runs with the correct working directory.
  • Quotes around the application argument: Enclosing the application's path in quotation marks is vital, especially when dealing with paths containing spaces.

For example, consider a batch file located at c:\scripts\mybatch.bat. To launch it hidden, the shortcut parameters would be configured as follows:

hstart /NOWINDOW /D=c:\scripts "c:\scripts\mybatch.bat"

Installation and Placement

To ensure easy access, it is recommended to copy hstart.exe to a directory included in the system's PATH environment variable. A suitable location could be C:\windows.

You can download Hidden Start (hstart) to begin using this helpful utility.

By utilizing Hidden Start and its parameters, you can seamlessly run command-line applications without the visual disruption of a flashing command prompt window.

#command prompt#batch file#startup#hide#windows#flashing