Skip to main content

How to Start a New Process in Batch Script

A fundamental task for any script is to launch other programs or executables. By default, when you run a program from a batch script, the script will pause and wait for that program to be closed before continuing. While this is sometimes useful, it's often not the desired behavior. You typically want your script to launch an application and then continue with its own tasks without waiting.

This guide will teach you how to use the standard, built-in START command to launch new processes. You will learn the critical difference between a "blocking" and "non-blocking" launch, and how to use START's parameters to control the new process's window and behavior.

The Default Behavior: Blocking Execution

When you put the name of an executable in a batch script, the script's execution is handed over to that program. The script itself freezes and will not proceed to the next line until the program is closed.

@ECHO OFF
ECHO Launching Notepad...
notepad.exe

ECHO Notepad has been closed. The script can now finish.

What happens:

  1. The script prints "Launching Notepad...".
  2. A Notepad window opens.
  3. The script stops and waits.
  4. Only after you manually close the Notepad window will the script resume and print "Notepad has been closed...".

This is called blocking or synchronous execution.

The Core Command: START for Non-Blocking Execution

The START command is designed to launch a program in a new, separate process. This allows your batch script to launch the program and immediately continue to its next line without waiting.

Syntax: START <program> [arguments]

For example:

@ECHO OFF
ECHO Launching Notepad in a new process...
START notepad.exe

ECHO The START command has finished, and the script continues immediately.

What happens:

  1. The script prints "Launching Notepad...".
  2. A Notepad window opens.
  3. The script immediately prints "The START command has finished...". It does not wait for you to close Notepad.

This is called non-blocking or asynchronous execution and is the main reason to use the START command.

Key START Parameters Explained

START has several useful switches to control the new process.

SwitchNameDescription
/MINMinimizeStarts the new program in a minimized window.
/MAXMaximizeStarts the new program in a maximized window.
/BBareStarts the application without creating a new window. The new process shares the same command prompt window. (Useful for console apps).
/WAITWaitThis powerful switch reverses the default behavior. It makes START a blocking command, forcing the script to wait until the new process is closed.

CRITICAL: The Quirky "Title" Parameter

This is the most common source of errors for anyone using the START command. The START syntax allows for an optional first parameter to be the "title" of the new window.

START ["title"] [options] "command"

If the very first argument you provide to START is a quoted string, START will always interpret it as the window title, not as the program you want to run.

Example of script with error:

REM This will FAIL. It opens a new CMD window with a very long title.
START "C:\Program Files\My Application\app.exe"

Solution: Provide a Dummy Title

The standard and correct way to handle this is to always provide a placeholder title (an empty quoted string "") as the first argument. This ensures your quoted path is treated as the command.

REM This is the CORRECT, robust syntax.
START "" "C:\Program Files\My Application\app.exe"
note

You should make a habit of always using this START "" ... pattern.

Common Pitfalls and How to Solve Them

Problem: Starting a Command Without a New Window

Sometimes you want to run a command-line tool as a new, separate process, but you don't want a new cmd.exe window to pop up.

Example of script with error:

REM This opens a new, temporary command window just to run the PING.
START ping google.com -t

Solution: Use the /B Switch

The /B switch runs the command in the background within the same window.

REM This runs the PING in the background of the current window.
START /B ping google.com -t
note

This is great for launching background tasks.

Practical Example: A "Launch Tools" Utility

This script acts as a simple dashboard to launch several common utilities at once. Because it uses START, all the programs open simultaneously.

@ECHO OFF
TITLE Tool Launcher
ECHO --- Launching Standard Utilities ---
ECHO.

ECHO Launching Notepad...
START "" "notepad.exe"

ECHO Launching Calculator...
START "" "calc.exe"

ECHO Launching Character Map...
START "" "charmap.exe"

ECHO.
ECHO --- All applications have been launched. ---

Conclusion

The START command is an essential tool for controlling how your batch script launches other programs and commands.

Key takeaways:

  • By default, running a program is a blocking operation.
  • Use START to launch a program in a non-blocking way, allowing your script to continue immediately.
  • CRITICAL: Always use the START "" "path\to\program" syntax to correctly handle paths that contain spaces.
  • Use START /WAIT when you need to launch a program but still need your script to pause until it's finished (e.g., for silent installers).
  • Use switches like /MIN and /MAX to control the appearance of the new window.