Programming Field

Start - DOS/Command Prompt Reference

[Windows 95/98/Me, Windows NT series] Executes programs in Windows. Start has options to control the execution method.

Syntax

start[.exe] ["<title>"] [/M | /MIN | /MINIMIZED] [/MAX | /MAXIMIZED]
  [/R | /RESTORED] [/W | /WAIT] [/D <working-dir>] [/I] [/SEPARATE | /SHARED]
  [/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL] [/NODE <numa-node>]
  [/AFFINITY <mask>] [/B] [<command> [<parameters>]]
start[.exe]

[Windows 95/98/Me only] ‘start’ is a program.

[Windows NT series] ‘start’ is an internal command of cmd, so ‘start.exe’ does not exist.

"<title>" [Windows NT series] Specifies the string to be displayed in the title bar when opening a new Command Prompt. The string must be enclosed in double quotation marks (" ").
<command> [<parameters>]

Specifies the command to be executed and its arguments. If <command> includes a file name with spaces, it needs to be enclosed in double quotation marks (" ").

[Windows 95/98/Me, and Windows NT series Extensions] You can specify not only the program but also a file name (which performs the action of opening that file).

[Windows NT series] If <command> is enclosed in " ", it may be interpreted as ‘"<title>"’. In such cases, you need to specify something like ‘""’ (specifying an empty title) before <command>.

/M | /MIN | /MINIMIZED

When executing the specified program in a new session, starts it in a minimized state.

[Windows NT series] ‘/M’ and ‘/MINIMIZED’ cannot be used.

/MAX | /MAXIMIZED

When executing the specified program in a new session, starts it in a maximized state.

[Windows NT series] ‘/MAXIMIZED’ cannot be used.

/R | /RESTORED [Windows 95/98/Me only] When executing the specified program in a new session, starts it in a regular window-size state (that is a default behavior).
/W | /WAIT Waits for the executed program/command to finish. (see details)
/D <working-dir> [Windows NT series] Specifies the new working directory (current directory) for the command/program to be executed. If not specified, the current working directory will be used.
/I [Windows NT series] Changes the environment for executing the program to the environment at the time when command.com/cmd.exe was run, rather than the current environment.
/SEPARATE | /SHARED

[Windows NT series] When executing a 16-bit program, specifying ‘/SEPARATE’ runs it in a new memory space, while ‘/SHARED’ runs it in a shared memory space.

[Windows XP or later 64-bit version] This option is not available as 16-bit programs cannot be executed.

/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL [Windows NT series] Specifies the priority when executing the program. The priorities are ranked from LOW < BELOWNORMAL < NORMAL < ABOVENORMAL < HIGH < REALTIME, in increasing order of priority.
/NODE <numa-node> [Windows NT series] Specifies the number of the NUMA (Non-Uniform Memory Architecture) node to be prioritized when executing the program. <numa-node> will be a numerical value.
/AFFINITY <mask>

[Windows NT series] Specifies the affinity mask for the processor in hexadecimal.

The meaning of the specified affinity mask may change when the /NODE option is also specified (details are unconfirmed).

/B [Windows NT series] Reuses the console window in which Start was executed, without creating a new window for the program. If ‘/WAIT’ is not specified, both the program that initiated Start and the program executed by Start will use the console window simultaneously, resulting in simultaneous text output. If both programs are waiting for text input, unintended behavior may occur.

Details

Usage of Start

Start executes a program that can run on Windows. While you can directly enter commands/programs in the prompt or batch programs without using Start, the behavior may differ between direct execution and execution using Start. In particular, when running a GUI program, whether or not the program waits for termination can change based on the following conditions.

Method of executionExtensionsExecute directlyExecute with Start
Execute from the promptOFFWaitNo wait
ONNo waitNo wait
Execute from the batch fileOFFWaitNo wait
ONWaitNo wait
[Windows 95/98/Me]-No waitNo wait

Note that the execution of Start can wait for the program to finish in all the above cases by using the ‘/WAIT’ option.

[Windows 95/98/Me, and Windows NT series Extensions] When specifying a file name other than a program for <command> with Start, it executes the program associated with the file and opens the file (using the default behavior). The program used in this case is the one registered in the registry as the program associated with the file. Note that it cannot be executed if there is no association.

[Windows 95/98/Me, and Windows NT series Extensions] If the string specified in <command> does not include an extension, in the case of Windows 95/98/Me, it attempts to execute the program considering ‘.COM’, ‘.EXE’, and ‘.BAT’ as if those extensions were omitted. In the case of Windows NT series Extensions, it uses the extensions specified in the ‘PATHEXT’ environment variable to treat them as if those extensions were omitted.

Samples

start /wait notepad.exe /p hoge.txt

Execute the ‘notepad.exe’ program with the argument ‘/p hoge.txt’ and wait for its completion. Note that when specifying ‘/p’ for the ‘Notepad’ (notepad.exe) program, it performs the printing of the specified text file.