Windows Vista 及之后版本的语法
START ["title"] [/D path] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
[/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
[/NODE] [/AFFINITY] [/WAIT] [/B]
[command/program] [parameters]
"title"
|
标题显示在窗口的标题栏中。
|
path
|
起始目录。
|
/B
|
启动应用程序而不创建新窗口。该应用程序忽略了^ C处理。除非应用程序启用^ C处理,否则^ Break是中断应用程序的唯一方法。
|
/I
|
新环境将是传递给cmd.exe的原始环境,而不是当前环境。
|
/MIN
|
启动窗口最小化。
|
/MAX
|
启动窗口最大化。
|
/SEPARATE
|
在IDLE优先级类中启动应用程序。
|
/SHARED
|
在共享内存空间中启动16位Windows程序。
|
/LOW
|
在IDLE优先级类中启动应用程序。
|
/NORMAL
|
在NORMAL优先级类中启动应用程序。
|
/HIGH
|
在HIGH优先级类中启动应用程序。
|
/REALTIME
|
在REALTIME优先级类中启动应用程序。
|
/ABOVENORMAL
|
在ABOVENORMAL优先级类中启动应用程序。
|
/BELOWNORMAL
|
在BELOWNORMAL优先级类中启动应用程序。
|
/NODE
|
将首选的NUMA(非统一内存体系结构)节点指定为十进制整数。
|
/AFFINITY
|
将处理器亲和力掩码指定为十六进制数。该过程仅限于在这些处理器上运行
AFFINITY和/ NODE结合使用时,亲和力掩码的解释会有所不同。指定亲和力掩码,就好像NUMA节点的处理器掩码右移以从零位开始。该过程仅限于在指定的亲和力掩码和NUMA节点之间共有的那些处理器上运行。如果没有共同的处理器,则该进程仅限于在指定的NUMA节点上运行。
|
/WAIT
|
启动应用程序并等待其终止。
|
command/program
|
如果它是内部cmd命令或批处理文件,则使用/ K开关将命令处理器运行到cmd.exe。这意味着该窗口将在运行命令后保留。
如果它不是内部cmd命令或批处理文件,则它是一个程序,可以作为窗口应用程序或控制台应用程序运行。
|
parameters
|
这些是传递给命令/程序的参数。
|
Specifying /NODE NODE允许以利用NUMA系统上的内存局部性的方式来创建进程。例如,可以创建两个通过共享内存进行大量通信的进程,以共享相同的首选NUMA节点,以最大程度地减少内存延迟。它们在可能的情况下从同一NUMA节点分配内存,并且可以在指定节点之外的处理器上自由运行。
开始/ NODE 1 / AFFINITY 0x3 application1.exe
开始/ NODE 1 / AFFINITY 0xc application2.exe
如果启用了命令扩展,则通过命令行或START命令进行的外部命令调用将发生如下变化:
通过将文件名作为命令键入,可以通过非可执行文件的文件关联来调用非可执行文件。(例如WORD.DOC将启动与.DOC文件扩展名关联的应用程序)。有关如何从命令脚本中创建这些关联的信息,请参见ASSOC和FTYPE命令。
当执行的应用程序是32位GUI应用程序时,CMD.EXE在返回命令提示符之前不会等待该应用程序终止。如果在命令脚本中执行,则不会发生此新行为。
当执行命令行的第一个标记是没有扩展名或路径限定符的字符串“ CMD”时,则将“ CMD”替换为COMSPEC变量的值。此更改可防止从当前目录中拾取CMD.EXE 。
当执行命令行的第一个标记不包含扩展名时,CMD.EXE使用PATHEXT环境变量的值来确定扩展名。PATHEXT变量的默认值为:
.COM;.EXE;.BAT;.CMD
注意语法与PATH变量相同,用分号分隔不同的元素。
搜索可执行文件时,如果任何扩展名都不匹配,则查看该名称是否与目录名称匹配。如果是这样,START命令将在该路径上启动资源管理器。如果从命令行完成,则相当于对该路径执行CD / D。
Windows XP 及更早版本的语法
START ["title"] [/Dpath] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
[/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
[/WAIT] [/B] [command/program]
[parameters]
"title"
|
标题显示在窗口的标题栏中。
|
path
|
起始目录。
|
/B
|
启动应用程序而不创建新窗口。该应用程序忽略了^ C处理。除非应用程序启用^ C处理,否则^ Break是中断应用程序的唯一方法。
|
/I
|
新环境将是传递给cmd.exe的原始环境,而不是当前环境。
|
/MIN
|
启动窗口最小化。
|
/MAX
|
启动窗口最大化。
|
/SEPARATE
|
在单独的内存空间中启动16位Windows程序。
|
/SHARED
|
在共享内存空间中启动16位Windows程序。
|
/LOW
|
在IDLE优先级类中启动应用程序。
|
/NORMAL
|
在NORMAL优先级类中启动应用程序。
|
/HIGH
|
在HIGH优先级类中启动应用程序。
|
/REALTIME
|
在REALTIME优先级类中启动应用程序。
|
/ABOVENORMAL
|
在ABOVENORMAL优先级类中启动应用程序。
|
/BELOWNORMAL
|
在BELOWNORMAL优先级类中启动应用程序。
|
/WAIT
|
启动应用程序,然后等待其终止。
|
command/program
|
如果它是内部cmd命令或批处理文件,则使用/ K开关将命令处理器运行到cmd.exe。这意味着该窗口将在运行命令后保留。
如果它不是内部cmd命令或批处理文件,则它是一个程序,可以作为窗口应用程序或控制台应用程序运行。
|
parameters
|
这些是传递给命令/程序的参数。
|
如果启用了命令扩展,则通过命令行或START命令进行的外部命令调用将发生如下变化:
通过将文件名作为命令键入,可以通过非可执行文件的文件关联来调用非可执行文件。(例如WORD.DOC将启动与.DOC文件扩展名关联的应用程序)。有关如何从命令脚本中创建这些关联的信息,请参见ASSOC和FTYPE命令。
当执行的应用程序是32位GUI应用程序时,CMD.EXE在返回命令提示符之前不会等待该应用程序终止。如果在命令脚本中执行,则不会发生此新行为。
当执行命令行的第一个标记是不带扩展名或路径限定符的字符串“ CMD”时,则将“ CMD”替换为COMSPEC变量的值。此更改可防止从当前目录中拾取CMD.EXE。
当执行命令行的第一个标记不包含扩展名时,CMD.EXE使用PATHEXT环境变量的值来确定扩展名。PATHEXT变量的默认值为:
.COM;.EXE;.BAT;.CMD
注意语法与PATH变量相同,用分号分隔不同的元素。
搜索可执行文件时,如果任何扩展名都不匹配,则查看该名称是否与目录名称匹配。如果是这样,START命令将在该路径上启动资源管理器。如果从命令行完成,则相当于对该路径执行CD / D。
Windows Vista and later syntax
START ["title"] [/D path] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
[/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
[/NODE] [/AFFINITY] [/WAIT] [/B]
[command/program] [parameters]
"title"
|
Title to display in the window's title bar.
|
path
|
Starting directory.
|
/B
|
Start an application without creating a new window. The application has ^C handling ignored. Unless the application enables ^C processing, ^Break is the only way to interrupt the application.
|
/I
|
The new environment will be the original environment passed to the cmd.exe and not the current environment.
|
/MIN
|
Start window minimized.
|
/MAX
|
Start window maximized.
|
/SEPARATE
|
Start 16-bit Windows program in separate memory space.
|
/SHARED
|
Start 16-bit Windows program in shared memory space.
|
/LOW
|
Start application in the IDLE priority class.
|
/NORMAL
|
Start application in the NORMAL priority class.
|
/HIGH
|
Start application in the HIGH priority class.
|
/REALTIME
|
Start application in the REALTIME priority class.
|
/ABOVENORMAL
|
Start application in the ABOVENORMAL priority class.
|
/BELOWNORMAL
|
Start application in the BELOWNORMAL priority class.
|
/NODE
|
Specifies the preferred NUMA (Non-Uniform Memory Architecture) node as a decimal integer.
|
/AFFINITY
|
Specifies the processor affinity mask as a hexadecimal number. The process is restricted to running on these processors.
The affinity mask is interpreted differently when /AFFINITY and /NODE are combined. Specify the affinity mask as if the NUMA node's processor mask is right shifted to begin at bit zero. The process is restricted to running on those processors in common between the specified affinity mask and the NUMA node. If no processors are in common, the process is restricted to running on the specified NUMA node.
|
/WAIT
|
Start the application and wait for it to terminate.
|
command/program
|
If it is an internal cmd command or a batch file, then the command processor is run with the /K switch to cmd.exe. Which means the window will remain after the command is run.
If it is not an internal cmd command or batch file, then it is a program and runs as either a windowed application or a console application.
|
parameters
|
These are the parameters passed to the command/program.
|
Specifying /NODE allows processes to be created in a way that leverages memory locality on NUMA systems. For example, two processes that communicate with each other heavily through shared memory can be created to share the same preferred NUMA node to minimize memory latencies. They allocate memory from the same NUMA node when possible, and they are free to run on processors outside the specified node.
start /NODE 1 /AFFINITY 0x3 application1.exe
start /NODE 1 /AFFINITY 0xc application2.exe
If Command Extensions are enabled, external command invocation through the command line or the START command changes as follows:
non-executable files may be invoked through their file association by typing the name of the file as a command. (e.g., WORD.DOC would launch the application associated with the .DOC file extension). See the ASSOC and FTYPE commands for how to create these associations from within a command script.
When executing an application that is a 32-bit GUI application, CMD.EXE does not wait for the application to terminate before returning to the command prompt. This new behavior does NOT occur if executing in a command script.
When executing a command line whose first token is the string "CMD" without an extension or path qualifier, then "CMD" is replaced with the value of the COMSPEC variable. This change prevents picking up CMD.EXE from the current directory.
When executing a command line whose first token does NOT contain an extension, CMD.EXE uses the value of the PATHEXT environment variable to determine the extension. The default value for the PATHEXT variable is:
.COM;.EXE;.BAT;.CMD
Notice the syntax is the same as the PATH variable, with semicolons separating the different elements.
When searching for an executable, if there is no match on any extension, then looks to see if the name matches a directory name. If it does, the START command launches the Explorer on that path. If done from the command line, it is the equivalent to doing a CD /D to that path.
Windows XP and earlier syntax
START ["title"] [/Dpath] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
[/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
[/WAIT] [/B] [command/program]
[parameters]
"title"
|
Title to display in the window's title bar.
|
path
|
Starting directory.
|
/B
|
Start an application without creating a new window. The application has ^C handling ignored. Unless the application enables ^C processing, ^Break is the only way to interrupt the application.
|
/I
|
The new environment will be the original environment passed to the cmd.exe and not the current environment.
|
/MIN
|
Start window minimized.
|
/MAX
|
Start window maximized.
|
/SEPARATE
|
Start 16-bit Windows program in separate memory space.
|
/SHARED
|
Start 16-bit Windows program in shared memory space.
|
/LOW
|
Start application in the IDLE priority class.
|
/NORMAL
|
Start application in the NORMAL priority class.
|
/HIGH
|
Start application in the HIGH priority class.
|
/REALTIME
|
Start application in the REALTIME priority class.
|
/ABOVENORMAL
|
Start application in the ABOVENORMAL priority class.
|
/BELOWNORMAL
|
Start application in the BELOWNORMAL priority class.
|
/WAIT
|
Start the application and wait for it to terminate.
|
command/program
|
If it is an internal cmd command or a batch file, then the command processor is run with the /K switch to cmd.exe. Which means the window will remain after the command is run.
If it is not an internal cmd command or batch file, then it is a program and runs as either a windowed application or a console application.
|
parameters
|
These are the parameters passed to the command/program.
|
If Command Extensions are enabled, external command invocation through the command line or the START command changes as follows:
non-executable files may be invoked through their file association by typing the name of the file as a command. (e.g., WORD.DOC would launch the application associated with the .DOC file extension). See the ASSOC and FTYPE commands for how to create these associations from within a command script.
When executing an application that is a 32-bit GUI application, CMD.EXE does not wait for the application to terminate before returning to the command prompt. This new behavior does NOT occur if executing in a command script.
When executing a command line whose first token is the string "CMD " without an extension or path qualifier, then "CMD" is replaced with the value of the COMSPEC variable. This change prevents picking up CMD.EXE from the current directory.
When executing a command line whose first token does NOT contain an extension, CMD.EXE uses the value of the PATHEXT environment variable to determine the extension. The default value for the PATHEXT variable is:
.COM;.EXE;.BAT;.CMD
Notice the syntax is the same as the PATH variable, with semicolons separating the different elements.
When searching for an executable, if there is no match on any extension, then looks to see if the name matches a directory name. If it does, the START command launches the Explorer on that path. If done from the command line, it is the equivalent to doing a CD /D to that path.