Windows 10 start 命令詳解


啓動單獨窗口以運行指定程序或命令。

另請參閱: assoc     ftype

基本用法     詳細用法

start /D "D:/Sublime Text 3" sublime.exe
			

基本語法

START ["title"] [/D path] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
      [/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
      [/NODE <NUMA node>] [/AFFINITY <hex affinity mask>] [/WAIT] [/B]
      [command/program] [parameters]
				

選項參數

參數 EN 解釋 中文翻譯 備注
"title" Title to display in window title bar. 標題顯示在窗口標題欄中。
path Starting directory. 起始目錄。
B

Start 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.

啓動應用程序不創建新窗口。

應用程序擁有 ^C 忽略處理。

除非應用程序啓用 ^C 處理,^Break 是中斷應用程序的唯一方式。

I The new environment will be the original environment passed to the cmd.exe and not the current environment. 新環境將是傳遞給 cmd.exe 的原始環境,而不是當前環境。
MIN Start window minimized. 啓動窗口最小化。
MAX Start window maximized. 啓動窗口最大化。
SEPARATE Start 16-bit Windows program in separate memory space. 在單獨內存空間啓動 16 位 Windows 程序。
SHARED Start 16-bit Windows program in shared memory space. 在共享內存空間啓動 16 位 Windows 程序。
LOW Start application in the IDLE priority class. 按 IDLE 優先級類啓動應用程序。
NORMAL Start application in the NORMAL priority class. 按 NORMAL 優先級類啓動應用程序。
HIGH Start application in the HIGH priority class. 按 HIGH 優先級類啓動應用程序。
REALTIME Start application in the REALTIME priority class. 按 REALTIME 優先級類啓動應用程序。
ABOVENORMAL Start application in the ABOVENORMAL priority class. 按 ABOVENORMAL 優先級類啓動應用程序。
BELOWNORMAL Start application in the BELOWNORMAL priority class. 按 BELOWNORMAL 優先級類啓動應用程序。
NODE Specifies the preferred Non-Uniform Memory Architecture (NUMA) node as a decimal integer. 將首選 NUMA (非統一內存體係結構) 節點指定為十進製整數。
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.

將處理器親和掩碼指定為十六進製數。

進程被限製在這些處理器上運行。

親和掩碼的解釋有所不同,當結閤 /AFFINITY 和 /NODE 時。

指定親和掩碼,就像 NUMA 節點處理器掩碼被右移以從 0 位開始。

進程被限製在指定的親和掩碼和 NUMA 節點之間的共同處理器上運行。

若沒有共同處理器,進程被限製在指定 NUMA 節點上運行。

WAIT Start 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.

This means that the window will remain after the command has been run.

If it is not an internal cmd command or batch file then it is a program and will run as either a windowed application or a console application.

若它是內部 cmd 命令或批處理文件,則采用 /K 切換到 cmd.exe 以運行命令處理器。

這意味著窗口將在命令運行後保留。

若它不是內部 cmd 命令或批處理文件,那麼它是程序且將作為窗口應用程序或控製颱應用程序運行。

parameters These are the parameters passed to the command/program. 這些是傳遞給 command/program 的參數。

注意:

64 位平颱不支持 SEPARATE 和 SHARED 選項。

指定 /NODE 允許 NUMA (非統一內存體係結構) 係統按杠杆局域內存方式創建進程。 例如,可以創建透過共享內存相互進行大量通信的 2 進程以共享相同首選 NUMA 節點,為最小化內存延遲。 他們從同一 NUMA 節點分配內存當可能時,且它們在指定節點外的處理器上能自由運行。

start /NODE 1 application1.exe

start /NODE 1 application2.exe

可以進一步約束這 2 進程以在同一 NUMA 節點內的特定處理器上運行。 在以下範例中,application1 在低階節點的 2 處理器上運行,而 application2 在下一節點的 2 處理器上運行。 此範例假定指定節點擁有至少 4 邏輯處理器。 注意,節點號可以改為該計算機中的任何有效節點號,不必更改親和掩碼。

start /NODE 1 /AFFINITY 0x3 application1.exe

start /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。

基本用法

功能 命令 文字解釋 示例 示例解釋
幫助 start /? 展示幫助信息

 

版權聲明: 本文為獨傢原創稿件,版權歸 樂數軟件 ,未經許可不得轉載。