Windows 安裝程式命令列選項Windows Setup Command-Line Options

下列命令列選項可用於 Windows 安裝程式 ( # A0) 。The following command-line options are available for Windows Setup (setup.exe). 從 Windows 10 (1607版)開始,您可以使用 >setupconfig 檔做為將參數傳遞至命令列上 Windows 安裝程式的替代方法。Beginning with Windows 10, version 1607, you can use a setupconfig file as an alternative to passing parameters to Windows Setup on a command line. 如需詳細資訊,請參閱 Windows 安裝程式自動化總覽For more information, see Windows Setup Automation Overview.


/1394Debug/1394Debug

可在 Windows 執行期間以及 Windows 安裝程式的 WindowsPE 設定階段期間,透過 IEEE 1394 (FireWire) 埠來啟用內核偵錯工具。Enables kernel debugging over an IEEE 1394 (FireWire) port while Windows is running and during the WindowsPE configuration pass of Windows Setup.

語法Syntax
/1394Debug: < 通道 > [串列傳輸速率: < 串列傳輸速率 > ]/1394Debug:<channel> [BaudRate:<baudrate>]


範例Examples

setup /1394debug:1 /baudrate:115200


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPEYes
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10No
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesNo


備註Remarks
< 通道 > 的預設值是1。The default value for <channel> is 1. 當 Windows 在調試過程中傳送資料時, < 串列傳輸速率 > 會指定要使用的傳輸。<baudrate> specifies the baud to use when Windows transfers data during debugging. 預設值是19200,但也可以設定為57600或115200。The default value is 19200, but can also be set to 57600 or 115200.


/AddBootMgrLast/AddBootMgrLast

指示 Windows 安裝程式新增 Windows 開機管理程式做為 UEFI 固件開機順序中的最後一個專案。Instructs Windows Setup to add the Windows Boot Manager as the last entry in the UEFI firmware boot order.

語法Syntax
/AddBootMgrLast/AddBootMgrLast


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPEYes
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10No
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesNo


備註Remarks
只有執行 Windows PE 4.0 或更新版本的 UEFI 電腦才支援此選項。This option is only supported on UEFI PCs running Windows PE 4.0 or later.


/Auto/Auto

只會執行自動升級為 Windows 10 或 Windows 8.1 大量授權版本。Performs an automated upgrade to Windows 10 or Windows 8.1 volume license editions only.


語法Syntax
/Auto {Clean |DataOnly |升級/Auto {Clean | DataOnly | Upgrade}


參數Parameters

參數Parameter 說明Description
清除Clean執行 Windows 的全新安裝Performs a clean install of Windows
DataOnlyDataOnly執行 Windows 的升級,只儲存 (而非應用程式的資料。 ) 如果由於相容性檢查而無法使用僅限資料的安裝選項,Windows 安裝程式將會以無訊息方式結束,並記錄結束碼。Performs an upgrade of Windows, saving only data (and not apps.) If the data-only installation option is not available due to compatibility checks, Windows Setup will exit silently and log an exit code.
升級Upgrade執行 Windows 儲存應用程式和資料的升級。Performs an upgrade of Windows saving apps and data. 如果無法使用升級安裝選項,或使用者需要解決應用程式相容性問題,Windows 安裝程式將會以無訊息方式結束,並記錄結束碼。If the upgrade installation option is not available, or the user needs to resolve an app compatibility issue, Windows Setup will exit silently and log an exit code.
NoAutoEitNoAutoEit未在 Windows 10 中使用。Not used in Windows 10. 在 Windows 8.1 中,如果發現錯誤,Windows 安裝程式不會結束,但會在使用者解決問題之前停止並停留在 Windows 安裝程式畫面上。In Windows 8.1, if an error is found, Windows Setup does not exit, but instead stops and stays on the Windows Setup screen until the user addresses the issue. 從該點開始的安裝已有人參與。The installation from that point on is attended.
PerformDUPerformDU未在 Windows 10 中使用。Not used in Windows 10. 在 Windows 8.1 中,Windows 安裝程式會檢查 Windows 安裝程式的動態更新In Windows 8.1, Windows Setup checks for Dynamic Updates for Windows Setup


範例Examples

setup /auto clean
setup /auto dataonly
setup /auto upgrade


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPENo
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10Yes
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesNo


備註Remarks
使用 /Auto 時,不能使用自動安裝檔案。When /Auto is used, an unattend file cannot be used. 使用 /Auto 時,Windows 安裝程式會在開始安裝之前,先使用 ei 並檢查相容性問題。When /Auto is used, Windows Setup consumes ei.cfg, and checks compatibility issues before starting the installation. 如果 ei 的格式不正確,Windows 安裝程式會以無訊息方式結束,並記錄結束碼。If ei.cfg is malformed, Windows Setup exits silently and logs an exit code. 請參閱 以下 Windows 安裝程式結束代碼See Windows Setup Exit Codes below. 使用 /Auto 時,僅支援下列 Windows 映像的自訂。When /Auto is used, only the following customizations of the Windows image are supported. 這並不是 Windows 安裝程式支援原則的變更,而是要澄清:套用 * 累計 (品質) 更新將更新套用至 * 完成功能更新所需的服務堆疊 (請參閱 服務堆疊更新 以取得詳細資訊) 將 * 更新套用至 Setup.exe 二進位檔或安裝程式用來更新功能的其他檔案 * 套用更新「安全作業系統」 (SafeOS) 用於 Windows 修復環境 * 新增或移除 * 隨選功能新增或移除的語言This is not a change in Windows Setup support policy but instead a clarification: * Applying a cumulative (quality) update * Applying updates to the servicing stack necessary to complete the feature update (see Servicing stack updates for more information) * Applying updates to Setup.exe binaries or other files that Setup uses for feature updates * Appling updates for the "safe operating system" (SafeOS) that is used for the Windows recovery environment * Adding or removing languages * Adding or removing Features on Demand

為了清楚起見,使用 /Auto 時,Windows 安裝程式不支援升級或全新安裝到已透過新增/移除/變更應用程式、設定和驅動程式自訂的 Windows 映像。For clarity, when /Auto is used, Windows Setup does not support upgrades nor clean installs to a Windows image that has been customized by adding / removing / changing applications, settings nor drivers.


/BitLocker/BitLocker

指定升級期間的 BitLocker 狀態。Specifies the BitLocker status during upgrades.

語法Syntax
/BitLocker {AlwaysSuspend |TryKeepActive |ForceKeepActive}/BitLocker {AlwaysSuspend | TryKeepActive | ForceKeepActive}


參數Parameters

參數Parameter 說明Description
AlwaysSuspendAlwaysSuspendBitLocker 一律會在升級期間暫停。BitLocker is always suspended during an upgrade.
TryKeepActiveTryKeepActive嘗試升級而不暫停 BitLocker。Attempts an upgrade without suspending BitLocker. 如果升級失敗,Windows 安裝程式將會暫停 BitLocker 並完成升級。If the upgrade fails, Windows Setup will suspend BitLocker and complete the upgrade. 如果未指定 /BitLocker 選項,這就是預設行為。This is the default behavior if the /BitLocker option is not specified.
ForceKeepActiveForceKeepActive在不暫停 BitLocker 的情況下啟用升級。Enables upgrading without suspending BitLocker. 如果無法完成升級,因為 BitLocker 處於作用中狀態,升級將會失敗。If the upgrade can't be completed because BitLocker is active, the upgrade will fail.


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPENo
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10Yes
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesYes

/BusParams/BusParams

指定1394、USB 或 NET debug 埠的 PCI 位址。Specifies the PCI address of a 1394, USB, or NET debug port.

語法Syntax
/BusParams: < bus. function > /BusParams:<bus.device.function>


範例Examples

setup /busparams:0.29.7


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPEYes
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10No
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesNo


備註Remarks
匯流排裝置功能編號必須是十進位格式。The bus, device, and function numbers must be in decimal format. 如需詳細資訊,請參閱 使用 USB 2.0 設定內核調試程式。For more info, see Setting Up Kernel Debugging with USB 2.0.


/ConfigFile/ConfigFile

指定 >setupconfig 檔案的位置。Specifies the location to the setupconfig file.

語法Syntax
/ConfigFile: < location > /ConfigFile:<location>


參數Parameters

參數Parameter 說明Description
<位置><location>包含 Windows 安裝程式設定檔之資料夾的本機檔案路徑或 UNC 網路路徑。Local file path or UNC network path to a folder that contains the Windows Setup configuration file.


範例Examples

setup /ConfigFile:\\server\share\


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPENo
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10Yes
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesNo


備註Remarks
如果您在命令列上包含選項,並在 >setupconfig 檔案中包含相同的選項,則 >setupconfig 檔選項和值都具有優先順序。If you include an option on the command line and the same option in the setupconfig file, the setupconfig file option and value has precedence.


/CompactOS/CompactOS

指定是否使用 Compact OS 功能來節省硬碟空間。Specifies whether to use the Compact OS feature to save hard drive space.

語法Syntax
/CompactOS {Enable |停用/CompactOS {Enable | Disable}


參數Parameters

參數Parameter 說明Description
啟用EnableWindows 安裝程式使用壓縮的系統檔案安裝 Windows。Windows Setup installs Windows using compressed system files.
停用DisableWindows 安裝程式使用未壓縮的系統檔案安裝 Windows。Windows Setup installs Windows using uncompressed system files.


範例Examples

setup /compactos enable


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPENo
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10Yes
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesYes


備註Remarks
根據預設,Windows 安裝程式會決定是否要自動使用這項功能。By default, Windows Setup determines whether to use this feature automatically. 若要深入瞭解 Compact OS,請參閱 COMPACT os、單一實例和映射優化To learn more about Compact OS, see Compact OS, single-instancing, and image optimization.


/Compat/Compat

指示 Windows 安裝程式如何處理相容性掃描和訊息。Instructs Windows Setup how to handle compatibility scans and messages.

語法Syntax
/Compat {IgnoreWarning |ScanOnly/Compat {IgnoreWarning | ScanOnly}


參數Parameters

參數Parameter 說明Description
IgnoreWarningIgnoreWarningWindows 安裝程式完成安裝,並忽略任何可解除的相容性訊息。Windows Setup completes installation, ignoring any dismissible compatibility messages.
ScanOnlyScanOnlyWindows 安裝程式透過相容性掃描執行,然後在不完成安裝) 的結束代碼結束 (,指出是否有任何相容性問題。Windows Setup runs through compatibility scans, and then exits (without completing the installation) with an exit code to indicate if any compatibility concerns are present. 如果找不到任何問題,Windows 安裝程式將會傳回0xC1900210。Windows Setup will return 0xC1900210 if no concerns are found. 如果找到相容性問題,Windows 安裝程式將會傳回0xC1900208。Windows Setup will return 0xC1900208 if compatibility concerns are found.


範例Examples

setup /compat ignorewarning


此命令可搭配其他參數使用。This command works with other switches. 若要在背景中執行 Windows 安裝程式而不需要任何 UI:To run Windows Setup in the background without any UI:

setup /auto upgrade /quiet /compat scanonly


若要忽略 UI 中的一般免責聲明,例如,語言變更:To ignore common disclaimers in the UI, for example, language changes:

setup /auto upgrade /quiet /compat scanonly /compat ignorewarning


如果 Windows 安裝程式發現相容性問題,IT 專業人員通常會查看相容性 XML。Often an IT Pro will look at the compat XML if Windows Setup finds compatibility issues. 使用 /CopyLogs 收集 Windows 安裝程式記錄:Use /CopyLogs to collect Windows Setup logs:

setup /auto upgrade /quiet /compat scanonly /compat ignorewarning /copylogs C:\Temp\Logfiles.log


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPENo
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10Yes
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updates是,只有 /Compat IgnoreWarningYes only with /Compat IgnoreWarning


備註Remarks
此選項可在 Windows 10 中使用。This option is available in Windows 10.

如果您使用 /Compat ScanOnly啟動 Windows 安裝程式:If you launch Windows Setup with /Compat ScanOnly:

  • 如果找不到任何相容性問題,則會傳回 MOSETUP_E_COMPAT_SCANONLY (0xC1900210) If it does not find any compatibility issue, it will return MOSETUP_E_COMPAT_SCANONLY (0xC1900210)
  • 如果找到可操作的相容性問題(例如應用程式),則會傳回 MOSETUP_E_COMPAT_INSTALLREQ_BLOCK (0xC1900208) If it finds actionable compatibility issues, like Apps, it will return MOSETUP_E_COMPAT_INSTALLREQ_BLOCK (0xC1900208)
  • 如果發現選取的 Svrmig.mig 選項無法使用,則會傳回 MOSETUP_E_COMPAT_MIGCHOICE_BLOCK (0xC1900204) If it finds that the Mig-Choice selected is not available, it will return MOSETUP_E_COMPAT_MIGCHOICE_BLOCK (0xC1900204)
  • 如果發現電腦不符合 Windows 10 的資格,則會傳回 MOSETUP_E_COMPAT_SYSREQ_BLOCK (0xC1900200) If it finds that machine is not eligible for Windows 10, it will return MOSETUP_E_COMPAT_SYSREQ_BLOCK (0xC1900200)
  • 如果發現機器沒有足夠的可用空間來安裝,則會傳回 MOSETUP_E_INSTALLDISKSPACE_BLOCK (0xC190020E) If it finds that machine does not have enough free space to install, it will return MOSETUP_E_INSTALLDISKSPACE_BLOCK (0xC190020E)


/CopyLogs/CopyLogs

Windows 安裝程式會在失敗時,將已壓縮的記錄複製或上傳到指定的位置,前提是電腦/使用者擁有位置的許可權和網路存取權。Windows Setup will copy or upload compressed logs upon failure to the specified location assuming machine/user has permission and network access to location.

語法Syntax
/CopyLogs < 位置 > /CopyLogs <location>


參數Parameters

參數Parameter 說明Description
<位置><location>本機檔案路徑或 UNC 網路路徑。Local file path or UNC network paths.


範例Examples

setup /copylogs \\server\share\


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPENo
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10Yes
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesYes


備註Remarks
接受的參數為本機檔案路徑和 UNC 網路路徑。Accepted parameters are local file paths and UNC network paths. 執行會在系統內容中執行,因此它可能沒有複製到需要使用者權限之位置的許可權。Execution runs in the system context, so it may not have permissions to copy to locations that require user permissions.


/Debug/Debug

當 Windows 正在執行時,以及在 Windows 安裝程式的 WindowsPE 設定階段期間,可透過通訊 (COM) 埠來啟用內核偵錯工具。Enables kernel debugging over a communications (COM) port when Windows is running, and during the WindowsPE configuration pass of Windows Setup.

語法Syntax
/Debug: < port > [串列傳輸速率: < 串列傳輸速率>]/Debug:<port> [BaudRate:<baudrate>]


參數Parameters

參數Parameter 說明Description
<港口><port>指定調試埠。Specifies the debugging port. 預設值為 1。The default value is 1.
<串列傳輸速率><baudrate>指定當 Windows 在調試過程中傳送資料時,所要使用的串列傳輸速率。Specifies the baud to use when Windows transfers data during debugging. 預設設定為19200,但也可以設定為57600或115200。The default setting is 19200, but can also be set to 57600 or 115200.


範例Examples

setup /debug:1 /baudrate:115200


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPEYes
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10No
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesNo

/DiagnosticPrompt/DiagnosticPrompt

指定 Windows 安裝程式時可以使用命令提示字元。Specifies that the Command Prompt is available during Windows Setup.

語法Syntax
/DiagnosticPrompt {Enable |停用/DiagnosticPrompt {Enable | Disable}


參數Parameters

參數Parameter 說明Description
啟用Enable您可以在 Windows 安裝程式期間按下 Shift + F10 來存取命令提示字元。The Command Prompt can be accessed by pressing Shift+F10 during Windows Setup.
停用DisableWindows 安裝程式期間無法使用命令提示字元。The Command Prompt is not available during Windows Setup. 當離線和 OOBE 階段正在執行時,命令提示字元會無法使用。The Command Prompt wil not be available while offline and OOBE phases are running. 這是預設值。This is the default setting.


範例Examples

setup /diagnosticprompt enable


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPENo
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10Yes
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesYes


備註Remarks
此選項可在 Windows 10 1703 版中使用。This option is available in Windows 10, Version 1703.


/DynamicUpdate/DynamicUpdate

指定 Windows 安裝程式是否將執行動態更新作業 (搜尋、下載及安裝更新) 。Specifies whether Windows Setup will perform Dynamic Update operations (search, download, and install updates).

語法Syntax
/DynamicUpdate {Enable |停用 |NoDrivers |NoLCU |NoDriversNoLCU}/DynamicUpdate {Enable | Disable | NoDrivers | NoLCU | NoDriversNoLCU}


參數Parameters

參數Parameter 說明Description
啟用Enable執行動態更新作業。Dynamic Update operations are performed.
停用Disable動態更新作業不會執行。Dynamic Update operations are not performed.
NoDriversNoDrivers除了驅動程式取得之外,也會執行動態更新作業。Dynamic Update operations are performed except driver acquisition.
NoDriversNoLCUNoDriversNoLCU除了驅動程式和最新的累積更新取得之外,還會執行動態更新作業。Dynamic Update operations are performed except driver and latest cumulative update acquisition.
NoLCUNoLCU除了最新的累積更新取得之外,也會執行動態更新作業。Dynamic Update operations are performed except latest cumulative update acquisition.


範例Examples

setup /auto upgrade /dynamicupdate disable


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPENo
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10Yes
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updates是 Microsoft Update (MU) 基礎功能更新;是,適用于整合更新的平臺 (只有在指定 /DynamicUpdate NoDrivers 時,才會 UUP 以) 為基礎的功能更新Yes for Microsoft Update (MU) based feature updates; Yes for Unified Updated Platform (UUP) based feature updates only when /DynamicUpdate NoDrivers is specified


備註Remarks
NoDriversNoLCUNoDriversNoLCU 是 Windows 10 2004 版的新版本。 NoDrivers, NoLCU and NoDriversNoLCU are new for Windows 10, version 2004. 指定 NoDriversNoLCUNoDriversNoLCU 時,將會執行動態更新作業,但不會執行驅動程式和(或)最新的累積更新。When NoDrivers, NoLCU or NoDriversNoLCU is specified, Dynamic Update operations will be performed but drivers and/or the latest cumulative update acquisition will not be performed. /DynamicUpdate可以搭配/SkipFinalize使用,以控制動態更新作業;搭配/Finalize使用時,會忽略/DynamicUpdate/DynamicUpdate can be used with /SkipFinalize to control Dynamic Update operations; /DynamicUpdate is ignored when used with /Finalize.


/EMSPort/EMSPort

在執行 Windows 安裝程式時及已安裝伺服器作業系統之後,啟用或停用「緊急管理服務 (EMS)」。Enables or disables Emergency Management Services (EMS) during Windows Setup and after the server operating system has been installed.

語法Syntax
/EMSPort: {COM1 |COM2 |UseBIOSSettings |Off} [/EMSBaudRate: < 串列傳輸速率 > ]/EMSPort: {COM1 | COM2 | UseBIOSSettings | Off} [/EMSBaudRate:<baudrate>]


參數Parameters

參數Parameter 說明Description
COM1COM1對 COM1 啟用 EMS。Enables EMS over COM1. 僅支援 x86 系統。Supported for x86 systems only.
COM2COM2對 COM2 啟用 EMS。Enables EMS over COM2. 僅支援 x86 系統。Supported for x86 systems only.
UseBIOSSettingsUseBIOSSettings使用 BIOS 指定的設定。uses the setting that the BIOS specifies. 若是 x86 系統,Windows 會使用序列通訊埠主控台重新導向 (SPCR) 資料表中的值。For x86 systems, Windows uses the value from the Serial Port Console Redirection (SPCR) table. 如果 BIOS 中未指定 SPCR 資料表或 EFI 主控台裝置路徑,Windows 會停用 EMS。If no SPCR table or EFI console device path is specified in the BIOS, Windows disables EMS.
關閉Off停用 EMS。Disables EMS. 如果已在 Windows 安裝程式中停用 EMS,您之後可藉著修改開機設定來啟用 EMS。If EMS is disabled in Windows Setup, you can later enable EMS by modifying the boot settings.
<串列傳輸速率><baudrate>指定當 Windows 在調試過程中傳送資料時,所要使用的串列傳輸速率。Specifies the baud to use when Windows transfers data during debugging. 預設值是19200,但也可以設定為57600或115200。The default value is 19200, but it can also be set to 57600 or 115200.


範例Examples

setup /emsport:COM1 /emsbaudrate:115200


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPEYes
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10No
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesNo


/Finalize/Finalize

指示 Windows 安裝程式先完成舊版作業系統上的更新作業,然後立即重新開機以開始離線階段。Instructions Windows Setup to finish previously started update operations on the down-level OS, followed by an immediate reboot to start the offline phase.

語法Syntax
/Finalize/Finalize


範例Examples

setup /auto upgrade /finalize


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPENo
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10Yes
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesNo


備註Remarks
此選項是 Windows 10 2004 版的新選項。This option is new for Windows 10, version 2004. /Finalize 不能以 /NoReboot 選項指定。/Finalize should not be specified with the /NoReboot option. 如果呼叫 /Finalize ,且裝置的狀態不是在執行 /SkipFinalize之後繼續執行,Windows 安裝程式將會傳回錯誤 MOSETUP_E_FINALIZE_RESUME_FAILURE (0xC1900132) 。Windows Setup will return error MOSETUP_E_FINALIZE_RESUME_FAILURE (0xC1900132) if /Finalize is called and the device is not in the proper state to resume after running /SkipFinalize. 請參閱 /SkipFinalizeSee /SkipFinalize.


/ImageIndex/ImageIndex

指示 Windows 安裝程式如果有多個映射可能適用,要從安裝安裝的作業系統映射。Instructions Windows Setup which OS image to install from install.wim if multiple images may be applicable.

語法Syntax
/ImageIndex < 索引 > /ImageIndex <index>


範例Examples

setup.exe /auto upgrade /quiet /compat ignorewarning /imageindex 2 /pkey xxxxx-xxxxx-xxxxx-xxxxx-xxxxx


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPEYes
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10Yes
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updates是 Microsoft Update (MU) 基礎功能更新;沒有適用于整合更新平臺 (UUP) 為基礎的功能更新Yes for Microsoft Update (MU) based feature updates; No for Unified Updated Platform (UUP) based feature updates


備註Remarks
如果有多個映射適用,Windows 安裝程式會提示使用者選取。If multiple images are applicable, Windows Setup will prompt the user to select. 如果有多個可用的映射,並使用 /quiet叫用 Windows 安裝程式,Windows 安裝程式會失敗,並出現錯誤 MOSETUP_E_NO_MATCHING_INSTALL_IMAGE (0xC1900215) 。If multiple images are applicable and Windows Setup is invoked with /Quiet, Windows Setup will fail with error MOSETUP_E_NO_MATCHING_INSTALL_IMAGE (0xC1900215). 當使用 /PKey 指定的產品金鑰適用于多個 OS 映射時,就可能發生這種情況。This may occur when the product key specified using /PKey applies to multiple OS images.


/InstallDrivers/InstallDrivers

將 .inf 樣式的驅動程式新增至新的 Windows 10 安裝。Adds .inf-style drivers to the new Windows 10 installation.

語法Syntax
/InstallDrivers < 位置 > /InstallDrivers <location>


參數Parameters

參數Parameter 說明Description
<位置><location>包含 .inf 檔案之資料夾的本機檔案路徑或 UNC 網路路徑。Local file path or UNC network path to a folder that contains .inf files.


範例Examples

setup.exe /auto upgrade /installdrivers C:\Fabrikam\drivers /noreboot


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPENo
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10Yes
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesYes


備註Remarks
此選項是 Windows 10 的新選項。This option is new for Windows 10. Driver .inf 可以位於指定位置內的資料夾中。The driver .inf can be in a folder within the specified location. 此命令會在指定的位置遞迴。The command will recurse through the specified location.


/InstallFrom/InstallFrom

指定在 Windows 安裝過程中使用的另一個 Install.wim 檔案。Specifies a different Install.wim file to use during Windows Setup.

語法Syntax
/InstallFrom < 路徑 > /InstallFrom<path>


參數Parameters

參數Parameter 說明Description
<路徑><path>要安裝的 .wim 檔案的路徑。The path of the .wim file to install.


範例Examples

setup /installfrom D:\custom.wim

此選項也可搭配分割影像檔案 ( swm) 使用。This option also be used with split image files (.swm). 選取數列中的第一個分割影像檔案Select the first split image file in the series

setup /installfrom D:\install.swm


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPENo
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10Yes
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesNo


備註Remarks
這可以讓您使用單一預先安裝環境,來安裝多個版本的 Windows 映像。This enables you to use a single preinstallation environment to install multiple versions of Windows images. 例如,您可以使用 32 位元版本的 Windows 安裝程式來部署 64 位元的 Windows 映像。For example, you can use a 32-bit version of Windows Setup to deploy a 64-bit Windows image. 您也可以使用回應檔案進行跨平台部署。You can also use an answer file for cross-platform deployments. 如需詳細資訊,請參閱Windows 安裝程式支援的平臺和跨平臺部署中的「建立多個架構類型的 WIM」。For more information, see “Creating a WIM for Multiple Architecture Types” in Windows Setup Supported Platforms and Cross-Platform Deployments


/InstallLangPacks/InstallLangPacks

將 ( # A0) 的語言套件新增至新的 Windows 10 安裝。Adds language packs (lp.cab) to the new Windows 10 installation.

語法Syntax
/InstallLangPacks < 位置 > /InstallLangPacks <location>


參數Parameters

參數Parameter 說明Description
<位置><location>包含 .inf 檔案之資料夾的本機檔案路徑或 UNC 網路路徑。Local file path or UNC network path to a folder that contains .inf files.


範例Examples

setup /auto upgrade /installlangpacks C:\Fabrikam\Languages\French /noreboot


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPENo
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10Yes
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updates是 Microsoft Update (MU) 基礎功能更新;沒有適用于整合更新平臺 (UUP) 為基礎的功能更新Yes for Microsoft Update (MU) based feature updates; No for Unified Updated Platform (UUP) based feature updates


備註Remarks
此選項是 Windows 10 的新選項。This option is new for Windows 10. 語言套件可以在指定 < 位置 > 內的資料夾中。The language packs can be in a folder within the specified <location>. 此命令會在指定 < 位置 > 的資料夾和子資料夾中,安裝所有的 lp.cab 檔案和語言功能,例如文字轉換語音的識別。The command installs all lp.cab files and language capabilities such as text-to-speech recognition, in the folder and subfolders at the specified <location>. 語言功能可能相依于其他語言功能。Language capabilities may have be dependent on other language capabilities. 例如,文字轉換語音相依于相同語言的基本元件。For example, Text-to-speech is dependent on the Basic component of the same language. 語言功能不應在 < 位置 > 中重新命名。Language capabilities should not be renamed within <location>. 請參閱 隨選語言和區域功能 (FOD) See Language and region Features on Demand (FOD). 在 Windows 10 1903 和更新版本中,安裝失敗會導致 Windows 安裝程式失敗並進行回復。In Windows 10, version 1903 and later, install failures will cause Windows Setup to fail and rollback.


/m/m

指示 Windows 安裝程式從替代位置複製其他檔案。Instructs Windows Setup to copy alternate files from an alternate location. 此選項會指示 Windows 安裝程式先查看替代位置,如果檔案存在,則使用這些檔案,而不是預設位置中的檔案。This option instructs Windows Setup to look in the alternate location first, and, if files are present, to use them instead of the files from the default location.

語法Syntax
/m: < folder_name > /m:<folder_name>


參數Parameters

參數Parameter 說明Description
<folder_name><folder_name>包含取代檔案的資料夾名稱和位置,而且可以是任何本機磁片磁碟機位置。Name and the location of the folder that contains the replacement files and can be any local drive location. 不支援 UNC 路徑。UNC paths are not supported.


範例Examples
若要將更新的 C:\Program Files\Messenger\Msmsgs.exe 檔案複製到 Windows 安裝中,請 $ 使用安裝程式命令,在 Pro\Sources OEM $ $Progs\Messenger\Msmsgs.exe 安裝來源上建立下列資料夾結構:To copy an updated C:\Program Files\Messenger\Msmsgs.exe file into the Windows installation, create the following folder structure on the Pro\Sources$OEM$$Progs\Messenger\Msmsgs.exe installation source by using the Setup command:

Pro\sources\setup.exe /m


如果您取代 Windows 檔案保護保護的檔案,您也必須將更新過的檔案複製到要與 Windows 一起安裝的本機來源。If you replace a file that Windows file protection protects, you must also copy the updated file to the local sources to be installed with Windows. 例如,您可以將檔案複製到 C:\Windows\i386 資料夾。For example, you may copy the file to the C:\Windows\i386 folder. 檔案名必須與 Windows 安裝程式中使用的名稱相同。The file name must be the same as the name that is used in Windows Setup. 例如,將下列檔案和資料夾結構新增至您的 $OEM $ directory: Pro\sources $ OEM $ $ $ \i386\ msmsgs.ex_。For example, add the following file and folder structure to your $OEM$ directory: Pro\sources$OEM$$$\i386\msmsgs.ex_. 如果您使用不在安裝共用上的檔案,則必須指定資料夾名稱。If you use files that are not on an installation share, you must specify the folder name. 在此範例中,<folder_name> 是 C:\ additional_files,其中 C:\ additional_files 是您自訂的 $OEM $ 目錄。In this example the <folder_name> is C:\additional_files, where C:\additional_files is your customized $OEM$ directory. 例如: C:\ additional_files $ $ \i386\ msmsgs.ex_。For example: C:\additional_files$$\i386\msmsgs.ex_.

setup /m:C:\additional_files

如果您變更取代檔案中的資源,就必須將更新的多語系消費者介面 (MUI) 檔加入至安裝中。If you change resources in your replacement files, you must add the updated Multilanguage User Interface (MUI) files to the installation.


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPEYes
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10No
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesNo


備註Remarks
您必須知曉檔案將安裝到 Windows 安裝中的位置。You must know where the files will be installed on the Windows installation. 所有其他檔案都必須複製到您安裝來源或 < folder_name > 中的 $OEM $ 資料夾。All the additional files must be copied to an $OEM$ folder in your installation sources or in the <folder_name>. $OEM $ 結構提供目的地安裝磁片的標記法:The $OEM$ structure provides a representation of the destination installation disk:

  • $OEM $ \$ 1 對應至% SYSTEMDRIVE%,這可能是 C 磁片磁碟機。$OEM$\$1 maps to %SYSTEMDRIVE%, which could be drive C.
  • $OEM $ \$ $ 對應至% WINDIR%,可能是 c:\windows。$OEM$\$$ maps to %WINDIR%, which could be C:\windows.
  • $OEM $ \$ progs 對應至 program files 目錄。$OEM$\$progs maps to the program files directory.
  • $OEM $ \$ doc 對應到使用者的我的檔資料夾。$OEM$\$docs maps to the user's My Documents folder.


/MigNEO/MigNEO

告訴 Windows 安裝程式在沒有其他離線階段優化的情況下,執行 Windows 的升級。Tells Windows Setup to perform an upgrade of Windows without additional offline phase optimizations.

語法Syntax
/MigNEO Disable/MigNEO Disable


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPENo
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10只有在/Auto 升級時才會是 |DataOnlyYes only with /Auto Upgrade | DataOnly
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updates只有在/Auto 升級時才會是 |DataOnlyYes only with /Auto Upgrade | DataOnly


備註Remarks
NEO 代表非事件目標,這是一項多重發行工作,可減少功能更新離線時間,包括對大部分使用者的單一重新開機。NEO stands for Non-event Objective, a multi-release effort to reduce feature update offline time, including a single reboot for most users. 此選項可在 Windows 10 1803 版和更新版本中使用。This option is available in Windows 10, version 1803 and later.


/MigrateDrivers/MigrateDrivers

指示 Windows 安裝程式是否要在升級期間從現有的安裝中遷移驅動程式。Instructs Windows Setup whether to migrate the drivers from the existing installation during the upgrade.

語法Syntax
/MigrateDrivers {All |以上/MigrateDrivers {All | None}


範例Examples

setup /auto upgrade /migratedrivers all
setup /auto upgrade /migratedrivers none /installdrivers N:\NewDrivers


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPENo
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10Yes
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesYes


備註Remarks
您可以指定 [ 全部 ] 或 [ ]。You can specify All or None. 根據預設,Windows 安裝程式會根據安裝選項,決定每個個別驅動程式最適合的選項。By default, Windows Setup decides which is best for each individual driver based on the install choice. 您可以搭配使用此參數與 /InstallDrivers,不過這並非必要。You can use this switch with /InstallDrivers, though it's not required.


/NetDebug/NetDebug

透過網路啟用內核調試。Enables kernel debugging over the network.

語法Syntax
/NetDebug: hostip = < w. x > . z、port = < n > 、key = < q. t > [, < > nodhcp] [,busparams = n-1]/NetDebug:hostip=<w.x.y.z>,port=<n>,key=<q.r.s.t>[,nodhcp][,busparams=<n.o.p>]


參數Parameters

參數Parameter 說明Description
<w.x.y.z. y. z><w.x.y.z>主機電腦的 IP 位址。IP address of the host computer.
<n><n>主機電腦的埠。Port of the host computer.
<問: t. t><q.r.s.t>用來設定安全連線的密碼。Password to set up a secure connection.
<n. o p><n.o.p>特定 PCI 匯流排裝置之介面卡的匯流排編號、裝置編號和功能編號。Bus number, device number, and function number of an adapter for a specific PCI bus device..


範例Examples

setup /netdebug:hostip=10.125.4.86,port=50000,key=0.0.0.0
setup /netdebug:hostip=10.125.4.86,port=50000,key=abcdefg.123.hijklmnop.456,nodhcp
setup /netdebug:hostip=10.1.4.8,port=50000,key=dont.use.previous.keys,busparams=1.5.0


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPEYes
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10No
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesNo


備註Remarks
使用 hostip 來識別主機電腦的 IP 位址。Use hostip to identify the IP address of the host computer. 使用 來識別埠。Use port to identify the port. 預設的起始埠是49152,而預設的終端埠是65535。The default start port is 49152, and the default end port is 65535. 使用 金鑰 來提供用來設定安全連線的密碼。Use key to provide a password to set up a secure connection. 使用 nodhcp 來避免使用 DHCP 連接。Use nodhcp to avoid using a DHCP connection. (選擇性) 。(optional). 使用 busparams 來選取特定 PCI 匯流排裝置的匯流排號碼、裝置編號和介面卡的功能編號。Use busparams to select the bus number, device number, and function number of an adapter for a specific PCI bus device. (選擇性) 。(optional). 如需其他詳細資訊,請參閱透過 網路纜線手動設定核心模式的偵錯工具For additional details, see Setting Up Kernel-Mode Debugging over a Network Cable Manually.


/NoReboot/NoReboot

指示 Windows 安裝程式不會在 Windows 安裝程式的下層階段完成之後重新開機電腦。Instructs Windows Setup not to restart the computer after the down-level phase of Windows Setup completes.

語法Syntax
/NoReboot/NoReboot


範例Examples

setup /noreboot


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPENo
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10Yes
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesNo


備註Remarks
此選項是 Windows 10 的新選項。This option is new for Windows 10. /NoReboot選項可讓您在 Windows 重新開機之前執行額外的命令。The /NoReboot option enables you to execute additional commands before Windows restarts. 此選項只會隱藏第一次重新開機。This option suppresses only the first reboot. 選項不會抑制後續的重新開機。The option does not suppress subsequent reboots.


/PKey/PKey

提供具有特定產品金鑰的 Windows 安裝程式。Supplies Windows Setup with the specific product key.

語法Syntax
/PKey < 產品金鑰 > /PKey <product key>


範例Examples

setup.exe /auto upgrade /pkey xxxxx-xxxxx-xxxxx-xxxxx-xxxxx


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPENo
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10Yes
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesYes


備註Remarks
此選項是 Windows 10 的新選項。This option is new for Windows 10.


/Priority/Priority

告知 Windows 安裝程式透過 Windows Update,讓功能更新的執行緒優先順序從 low 提高到正常。Tells Windows Setup to increase the thread priority from low to normal for feature updates through Windows Update.

語法Syntax
/Priority {Normal |低壓/Priority {Normal | Low}


參數Parameters

參數Parameter 說明Description
NormalNormalWindows 安裝程式將以一般執行緒優先順序執行。Windows Setup will execute with normal thread priority.
LowWindows 安裝程式將以低執行緒優先順序執行。Windows Setup will execute with low thread priority.


範例Examples

setup.exe /auto upgrade /skipfinalize /priority low


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPENo
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10Yes
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesYes


備註Remarks
此選項可在 Windows 10 1709 版和更新版本中使用。This option is available in Windows 10, version 1709 and later. 優先順序是 Windows 10 的最新版本2004。Low priority is new for Windows 10, version 2004. 依預設,以媒體為基礎的安裝已依照 一般 優先順序執行,但可減少為 優先順序。Media based installations already run at Normal priority by default but can be decreased to Low priority.


/PostOOBE/PostOOBE

Windows 安裝程式完成之後,請執行腳本。After Windows Setup is complete, run a script.

語法Syntax
/PostOOBE < 位置 > [\setupcomplete.cmd]/PostOOBE<location> [\setupcomplete.cmd]


參數Parameters

參數Parameter 說明Description
<位置><location>名為 >setupcomplete.cmd 之檔案的本機檔案路徑或 UNC 網路路徑,或包含 >setupcomplete.cmd 的資料夾。Local file path or UNC network path to a file named setupcomplete.cmd or to a folder that contains setupcomplete.cmd.


範例Examples

setup.exe /auto upgrade /postoobe C:\Fabrikam\setupcomplete.cmd


資料夾的路徑,其中包含名稱為 >setupcomplete.cmd 的腳本。Path to folder that contains a script with the name setupcomplete.cmd. >setupcomplete.cmd 會複製到 $Windows。 ~ BT 會在 OOBE 之後執行。setupcomplete.cmd is copied to $Windows.~BT to be run after OOBE.

setup.exe /auto upgrade /postoobe C:\Fabrikam


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPENo
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10Yes
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesYes


備註Remarks
此選項可在 Windows 10 中使用。This option is available in Windows 10.


/PostRollback/PostRollback

指示 Windows 安裝程式在功能更新無法安裝和復原變更時執行腳本,或使用者選擇卸載功能更新並返回舊版 Windows 時執行腳本。Instructs Windows Setup to run a script if the feature update fails to install and rolls back the changes, or if the user chooses to uninstall the feature update and go back to a previous version of Windows.

語法Syntax
/PostRollback < 位置 > [/PostRollbackCoNtext {system | user}]/PostRollback <location> [/PostRollbackContext {system | user}]


參數Parameters

參數Parameter 說明Description
<位置><location>名為 setuprollback 之檔案的本機檔案路徑或 UNC 網路路徑,或包含 setuprollback 的資料夾。Local file path or UNC network path to a file named setuprollback.cmd, or to a folder that contains setuprollback.cmd.


範例Examples

setup.exe /auto upgrade /postrollback C:\Fabrikam\setuprollback.cmd
setup.exe /postrollback C:\Fabrikam\setuprollback.cmd /postrollbackcontext user
setup.exe /auto upgrade /postrollback \server\share


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPENo
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10Yes
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesYes


備註Remarks
此選項可在 Windows 10 中使用。This option is available in Windows 10. /PostRollbackCoNtext 選項可在 Windows 10 1803 版和更新版本中使用。/PostRollbackContext option is available in Windows 10, version 1803 and later. /PostRollbackCoNtext選項可讓您指定腳本是在系統帳戶的內容中執行,還是在已登入使用者的帳戶中執行。The /PostRollbackContext option allows you to specify whether the script runs in the context of the System account or the account of the signed in user. 根據預設,會在 使用者 內容中從媒體執行 setuprollback 更新,這需要第一個登入升級後的使用者具有系統管理員許可權。By default, updates from media run setuprollback.cmd in user context, which requires the first user who logs in post-upgrade to have administrator rights. 針對來自 Windows Update 的更新,setuprollback 會在 系統 內容中執行,而不論第一次登入使用者的許可權為何。For updates from Windows Update, setuprollback.cmd runs in system context, regardless of the rights of the first logged-in user. Windows 安裝程式會將 setuprollback 複製到 $Windows. ~ BT,以在 OOBE 之後執行。Windows Setup will copy setuprollback.cmd to $Windows.~BT to be run after OOBE.


/Quiet/Quiet

這會抑制任何 Windows 安裝程式使用者體驗,包括復原使用者體驗。This will suppress any Windows Setup user experience including the rollback user experience.

語法Syntax
/Quiet/Quiet


範例Examples

setup /auto upgrade /quiet


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPENo
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10Yes
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesNo


備註Remarks
此選項可在 Windows 10 中使用。This option is available in Windows 10.


/ReflectDrivers/ReflectDrivers

針對已啟用協力廠商加密的電腦,指定包含加密驅動程式之資料夾的路徑。Specifies the path to a folder that contains encryption drivers for a computer that has third-party encryption enabled.

語法Syntax
/ReflectDrivers < 位置 > /ReflectDrivers <location>


參數Parameters

參數Parameter 說明Description
<位置><location>包含 .inf 檔案之資料夾的本機檔案路徑或 UNC 網路路徑。Local file path or UNC network path to a folder that contains .inf files.


範例Examples

setup /auto upgrade /quiet /reflectdrivers C:\Fabrikam\drivers


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPENo
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10Yes
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesYes


備註Remarks
此選項可在 Windows 10 1607 版中使用。This option is available in Windows 10, version 1607. 請確定該 < 位置 > 只包含一組基本的加密驅動程式。Make sure that <location> contains only a minimal set of encryption drivers. 擁有比所需更多的驅動程式可能會對升級案例造成負面影響。Having more drivers than necessary can negatively impact upgrade scenarios.


/ResizeRecoveryPartition/ResizeRecoveryPartition

指定是否可以調整現有 Windows 修復環境 (Windows RE) 磁碟分割,或在安裝期間建立新的環境。Specifies whether it's OK to resize the existing Windows Recovery Environment (Windows RE) partition or create a new one during installation.

語法Syntax
/ResizeRecoveryPartition {Enable |停用/ResizeRecoveryPartition {Enable | Disable}


參數Parameters

>
參數Parameter 說明Description
啟用Enable在安裝期間,Windows 可以調整現有 Windows RE tools 磁碟分割的大小,或視需要建立一個新的。During installation, Windows can resize the existing Windows RE tools partition or create a new one if needed.
停用DisableWindows 不會調整現有 Windows RE tools 磁碟分割的大小,或在安裝期間建立一個新的。Windows does not resize the existing Windows RE tools partition or create a new one during installation.


範例Examples

setup /resizerecoverypartition disable


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPEYes
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10Yes
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesYes


備註Remarks
若要深入瞭解 Windows RE 磁碟分割,請參閱 UEFI/以 GPT 為基礎的硬碟磁碟分割 和以 BIOS/MBR 為基礎的硬碟磁碟分割To learn more about Windows RE partitions, see UEFI/GPT-based hard drive partitions and BIOS/MBR-based hard drive partitions.


/ShowOOBE/ShowOOBE

指定使用者是否需要以互動方式完成 (OOBE) 的現成體驗。Specifies whether the user is required to interactively complete the out of box experience (OOBE).

語法Syntax
/ShowOOBE {Full |以上/ShowOOBE {Full | None}


參數Parameters

參數Parameter 說明Description
完整Full要求使用者以互動方式完成 (OOBE) 的現成體驗。Requires the user to interactively complete the out of box experience (OOBE).
NoneNone略過 OOBE 並選取預設設定。Skips OOBE and selects the default settings.


範例Examples

setup.exe /auto upgrade /showoobe full


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPENo
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10Yes
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesYes


備註Remarks
此選項可在 Windows 10 中使用。This option is available in Windows 10.


/SkipFinalize/SkipFinalize

指示設定,以啟動下層作業系統上的更新作業,而不會起始重新開機以啟動離線階段。Instructions setup to start update operations on the down-level OS without initiating a reboot to start the offline phase.

語法Syntax
/SkipFinalize/SkipFinalize


範例Examples

setup /auto upgrade /quiet /priority low /skipfinalize


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPENo
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10Yes
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesNo


備註Remarks
此選項可在 Windows 10 2004 版中使用。This option is available in Windows 10, version 2004. /SkipFinalize 會在不認可的 情況下 準備更新。/SkipFinalize will prepare the update without committing. 這可讓您使用 /Finalize 完成認可,然後立即重新開機裝置。This allows for the commit to be completed using /Finalize followed by an immediate reboot of the device. 這是暫止更新的慣用方法,因為 /NoReboot 選項會認可變更,但會抑制第一次重新開機以允許其他工作。This is the preferred approach to pending the update as the /NoReboot option will commit the changes but suppress the first reboot to allow for additional tasks. /SkipFinalize 不會自動指示 Windows 安裝程式在電腦使用中時,在下層作業系統上以無訊息模式執行。/SkipFinalize will not automatically instruct Windows Setup to run silently on the down-level OS while the computer is in use. 使用 /quiet 來抑制 Windows 安裝程式的使用者體驗,並 /Priority Low 以防止使用者的影響。Use /Quiet to suppress the Windows Setup user experience, and /Priority Low to prevent user impact. /SkipFinalize 不能以 /NoReboot 選項指定。/SkipFinalize should not be specified with the /NoReboot option. 請參閱 /FinalizeSee /Finalize.


/Telemetry/Telemetry

指定 Windows 安裝程式是否應該捕獲和報告安裝資料。Specifies whether Windows Setup should capture and report installation data.

語法Syntax
/Telemetry {Enable |停用/Telemetry {Enable | Disable}


參數Parameters

參數Parameter 說明Description
啟用EnableWindows 安裝程式會捕捉和報告安裝資料。Windows Setup captures and reports installation data.
停用DisableWindows 安裝程式不會捕捉和報告安裝資料。Windows Setup does not capture and report installation data.


範例Examples

setup /telemetry disable


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPENo
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10Yes
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesYes


/TempDrive/TempDrive

指示 Windows 安裝程式將暫存的安裝檔案放在指定的磁碟分割上。Instructs Windows Setup to put temporary installation files on the specified partition.

語法Syntax
/TempDrive < drive_letter > /TempDrive <drive_letter>


參數Parameters

參數Parameter 說明Description
<drive_letter><drive_letter>Windows 安裝程式期間將安裝檔案複製到其中的磁碟分割。The partition to copy installation files to during Windows Setup.


範例Examples

setup /tempdrive H


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPENo
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10Yes
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesYes


備註Remarks
此選項可在 Windows 10 1607 版中使用。This option is available in Windows 10, version 1607. 針對升級, /TempDrive 選項只會影響暫存檔案的位置。For an upgrade, the /TempDrive option affects only the placement of temporary files. 作業系統會在您執行 setup.exe 檔案的磁碟分割中進行升級。The operating system is upgraded in the partition from which you run the setup.exe file.


/Unattend/Unattend

可讓您搭配 Windows 安裝程式使用回應檔案。Enables you to use an answer file with Windows Setup.

語法Syntax
/Unattend: < answer_file > /Unattend:<answer_file>


參數Parameters

參數Parameter 說明Description
<answer_file><answer_file>自動 Windows 安裝程式回應檔案的檔案路徑和檔案名。The file path and file name of the unattended Windows Setup answer file.


範例Examples

setup /unattend:\\server\share\unattend.xml


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPEYes
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10No
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesNo


備註Remarks
這就是所謂的自動安裝。This is known as an unattended installation. 您必須指定 < answer_file > 的值。You must specify a value for <answer_file>. Windows 安裝程式會在安裝期間套用回應檔案中的值。Windows Setup applies the values in the answer file during installation. 使用 /unattend 時,不能使用 /AutoWhen /Unattend is used, /Auto cannot be used.


/Uninstall/Uninstall

決定 Windows 是否會包含可讓使用者回到先前作業系統的控制項。Determines whether Windows will include controls that allow the user to go back to the previous operating system.

語法Syntax
/Uninstall {Enable |停用/Uninstall {Enable | Disable}


參數Parameters

參數Parameter 說明Description
啟用EnableWindows 安裝程式包含的控制項可讓使用者回到先前的作業系統。Windows Setup includes controls that allow the user to go back to the previous operating system.
停用DisableWindows 安裝程式不包含可讓使用者回到先前作業系統的控制項。Windows Setup does not includes controls that allow the user to go back to the previous operating system.


範例Examples

setup /uninstall disable


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPENo
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10Yes
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesYes


備註Remarks
此選項可在 Windows 10 中使用。This option is available in Windows 10.


/USBDebug/USBDebug

設定 USB 埠上的偵錯作業。Sets up debugging on a USB port.

語法Syntax
/USBDebug: < hostname > /USBDebug:<hostname>


參數Parameters

參數Parameter 說明Description
<主機 名><hostname>要進行偵錯工具的電腦名稱稱。The name of the computer to debug.


範例Examples

setup /usbdebug:testmachine01


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPEYes
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10No
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesNo


備註Remarks
偵錯資料會在下次重新開機時生效。Debug data is effective on the next reboot.


/WDSDiscover/WDSDiscover

指定 Windows 部署服務 (WDS) 用戶端應該處於探索模式。Specifies that the Windows Deployment Services (WDS) client should be in discover mode.

語法Syntax
/WDSDiscover/WDSDiscover


範例Examples
若要以動態探索模式啟動 WDS 用戶端,請執行下列命令:To start the WDS client in dynamic discover mode, run the following command:

setup /wds /wdsdiscover


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPEYes
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10No
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesNo


備註Remarks
如果您未指定伺服器的 /WDSServer WDS 搜尋。If you do not specify /WDSServer WDS searches for a server.


/WDSServer/WDSServer

指定用戶端應該連接的 Windows 部署服務 (WDS) 伺服器的名稱。Specifies the name of the Windows Deployment Services (WDS) server that the client should connect to.

語法Syntax
/WDSServer: < servername > /WDSServer:<servername>


參數Parameters

參數Parameter 說明Description
<servername><servername>Windows 部署服務伺服器的名稱。The name of the Windows Deployment Services server.


範例Examples
若要以靜態探索模式啟動 Windows 部署服務用戶端,請執行下列命令:To start the Windows Deployment Services client in static discover mode, run the following command:

setup /wds /wdsdiscover /wdsserver:MyWDSServer


適用性Applicability

組態Configuration 適用Applicable
WinPE開始 Setup.exeSetup.exe started from WinPEYes
從 Windows 10 開始 Setup.exeSetup.exe started from Windows 10No
用於功能更新的setupconfig.ini檔案setupconfig.ini files used for feature updatesNo


備註Remarks
若要使用此設定,您也必須使用 /WDSDiscover 選項。To use this setting, you must also use the /WDSDiscover option. < servername > 可以是 IP 位址、NetBIOS 名稱或完整功能變數名稱) (FQDN。<servername> can be an IP address, a NetBIOS name, or a fully qualified domain name (FQDN).

Windows 安裝程式結束代碼Windows Setup Exit Codes

結束代碼名稱Exit Code Name 結束代碼值Exit Code Value 說明Description
CONX_SETUP_EXITCODE_CONTINUE_REBOOTCONX_SETUP_EXITCODE_CONTINUE_REBOOT0x30x3此升級成功。This upgrade was successful.
CONX_SETUP_EXITCODE_RESUME_AT_COMPAT_REPORTCONX_SETUP_EXITCODE_RESUME_AT_COMPAT_REPORT0x50x5相容性檢查偵測到需要解決的問題,才能繼續進行升級。The compatibility check detected issues that require resolution before the upgrade can continue.
CONX_SETUP_EXITCODE_AUTO_INSTALL_FAILCONX_SETUP_EXITCODE_AUTO_INSTALL_FAIL0x70x7安裝選項 (升級或僅) 無法使用的資料。The installation option (upgrade or data only) was not available.


Windows 安裝程式狀態Windows Setup States

Windows 安裝程式版設定和產品識別碼檔案 (EI 和 PID.txt) Windows Setup Edition Configuration and Product ID Files (EI.cfg and PID.txt)

Windows 安裝程式記錄檔和事件記錄檔Windows Setup Log Files and Event Logs