Windows Setup Command-Line Options

The following command-line options are available for Windows Setup (setup.exe). 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. For more information, see Windows Setup Automation Overview.


/1394Debug

Enables kernel debugging over an IEEE 1394 (FireWire) port while Windows is running and during the WindowsPE configuration pass of Windows Setup.

Syntax
/1394Debug:<channel> [BaudRate:<baudrate>]


Examples

setup /1394debug:1 /baudrate:115200


Applicability

Configuration Applicable
Setup.exe started from WinPEYes
Setup.exe started from Windows 10 or above No
setupconfig.ini files used for feature updatesNo


Remarks
The default value for <channel> is 1. <baudrate> specifies the baud to use when Windows transfers data during debugging. The default value is 19200, but can also be set to 57600 or 115200.


/AddBootMgrLast

Instructs Windows Setup to add the Windows Boot Manager as the last entry in the UEFI firmware boot order.

Syntax
/AddBootMgrLast


Applicability

Configuration Applicable
Setup.exe started from WinPEYes
Setup.exe started from Windows 10 and aboveNo
setupconfig.ini files used for feature updatesNo


Remarks
This option is only supported on UEFI PCs running Windows PE 4.0 or later.


/Auto

Performs an automated upgrade to a newer version of Windows.


Syntax
/Auto {Clean | DataOnly | Upgrade}


Parameters

Parameter Description
CleanPerforms a clean install of Windows.
DataOnlyPerforms 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.
UpgradePerforms an upgrade of Windows saving apps and data. 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.

Starting with Windows 11, version 22H2, specifying the Upgrade option requires that the installation media that has the same System Default UI Language as the target device. In earlier versions of Windows, you could perform some cross-language deployments (for example, en-US to en-GB) but these types of upgrades are no longer allowed.
NoAutoEitNot used starting in Windows 10. 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.
PerformDUNot used starting in Windows 10. 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
Setup.exe started from WinPENo
Setup.exe started from Windows 10 or above Yes
setupconfig.ini files used for feature updatesNo


Remarks
When /Auto is used, an unattend file cannot be used. When /Auto is used, Windows Setup consumes ei.cfg, and checks compatibility issues before starting the installation. If ei.cfg is malformed, Windows Setup exits silently and logs an exit code. See Windows Setup Exit Codes below. When /Auto is used, only the following customizations of the Windows image are supported. 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

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.

When /Auto is used, Windows Setup will upgrade using the \sources\install.wim Windows image. Using Dism /Export-Image, this image can be used as a source image for exporting a new image using the /Compress:recovery option. This exported image must be named install.esd for Windows Setup to use it instead of install.wim. You must also remove install.wim from \sources. You should only export to install.esd if you want to reduce the Windows image size. The exported image will be smaller, but will not be mountable.

Starting with Windows 11, /Auto will not accept nor surpress the end user license agreement. See /EULA.


/BitLocker

Specifies the BitLocker status during upgrades.

Syntax
/BitLocker {AlwaysSuspend | TryKeepActive | ForceKeepActive}


Parameters

Parameter Description
AlwaysSuspendBitLocker is always suspended during an upgrade.
TryKeepActiveAttempts an upgrade without suspending BitLocker. If the upgrade fails, Windows Setup will suspend BitLocker and complete the upgrade. This is the default behavior if the /BitLocker option is not specified.
ForceKeepActiveEnables upgrading without suspending BitLocker. If the upgrade can't be completed because BitLocker is active, the upgrade will fail.


Applicability

Configuration Applicable
Setup.exe started from WinPENo
Setup.exe started from Windows 10 or above Yes
setupconfig.ini files used for feature updatesYes

/BusParams

Specifies the PCI address of a 1394, USB, or NET debug port.

Syntax
/BusParams:<bus.device.function>


Examples

setup /busparams:0.29.7


Applicability

Configuration Applicable
Setup.exe started from WinPEYes
Setup.exe started from Windows 10 or above No
setupconfig.ini files used for feature updatesNo


Remarks
The bus, device, and function numbers must be in decimal format. For more information, see Setting Up Kernel Debugging with USB 2.0.


/ConfigFile

Specifies the location to the setupconfig file.

Syntax
/ConfigFile:<location>


Parameters

Parameter Description
<location>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
Setup.exe started from WinPENo
Setup.exe started from Windows 10 or above Yes
setupconfig.ini files used for feature updatesNo


Remarks
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

Specifies whether to use the Compact OS feature to save hard drive space.

Syntax
/CompactOS {Enable | Disable}


Parameters

Parameter Description
EnableWindows Setup installs Windows using compressed system files.
DisableWindows Setup installs Windows using uncompressed system files.


Examples

setup /compactos enable


Applicability

Configuration Applicable
Setup.exe started from WinPENo
Setup.exe started from Windows 10 or above Yes
setupconfig.ini files used for feature updatesYes


Remarks
By default, Windows Setup determines whether to use this feature automatically. To learn more about Compact OS, see Compact OS, single-instancing, and image optimization.


/Compat

Instructs Windows Setup how to handle compatibility scans and messages.

Syntax
/Compat {IgnoreWarning | ScanOnly}


Parameters

Parameter Description
IgnoreWarningWindows Setup completes installation, ignoring any dismissible compatibility messages.
ScanOnlyWindows 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 Setup will return 0xC1900210 if no concerns are found. Windows Setup will return 0xC1900208 if compatibility concerns are found.


Examples

setup /compat ignorewarning


This command works with other switches. To run Windows Setup in the background without any UI:

setup /auto upgrade /quiet /compat scanonly


To ignore common disclaimers in the UI, for example, language changes:

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


Often an IT Pro will look at the compat XML if Windows Setup finds compatibility issues. Use /CopyLogs to collect Windows Setup logs:

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


Applicability

Configuration Applicable
Setup.exe started from WinPENo
Setup.exe started from Windows 10 or above Yes
setupconfig.ini files used for feature updatesYes only with /Compat IgnoreWarning


Remarks
This option is available starting in Windows 10 and above.

If you launch Windows Setup with /Compat ScanOnly:

  • If it does not find any compatibility issue, it will return MOSETUP_E_COMPAT_SCANONLY (0xC1900210)
  • If it finds actionable compatibility issues, like Apps, it will return MOSETUP_E_COMPAT_INSTALLREQ_BLOCK (0xC1900208)
  • If it finds that the Mig-Choice selected is not available, it will return MOSETUP_E_COMPAT_MIGCHOICE_BLOCK (0xC1900204)
  • If it finds that machine is not eligible for Windows 10 or above, it will return MOSETUP_E_COMPAT_SYSREQ_BLOCK (0xC1900200)
  • If it finds that machine does not have enough free space to install, it will return MOSETUP_E_INSTALLDISKSPACE_BLOCK (0xC190020E)


/CopyLogs

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 <location>


Parameters

Parameter Description
<location>Local file path or UNC network paths.


Examples

setup /copylogs \\server\share\


Applicability

Configuration Applicable
Setup.exe started from WinPENo
Setup.exe started from Windows 10 or above Yes
setupconfig.ini files used for feature updatesYes


Remarks
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

Enables kernel debugging over a communications (COM) port when Windows is running, and during the WindowsPE configuration pass of Windows Setup.

Syntax
/Debug:<port> [BaudRate:<baudrate>]


Parameters

Parameter Description
<port>Specifies the debugging port. The default value is 1.
<baudrate>Specifies the baud to use when Windows transfers data during debugging. The default setting is 19200, but can also be set to 57600 or 115200.


Examples

setup /debug:1 /baudrate:115200


Applicability

Configuration Applicable
Setup.exe started from WinPEYes
Setup.exe started from Windows 10 or above No
setupconfig.ini files used for feature updatesNo

/DiagnosticPrompt

Specifies that the Command Prompt is available during Windows Setup.

Syntax
/DiagnosticPrompt {Enable | Disable}


Parameters

Parameter Description
EnableThe Command Prompt can be accessed by pressing Shift+F10 during Windows Setup.
DisableThe Command Prompt is not available during Windows Setup. 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
Setup.exe started from WinPENo
Setup.exe started from Windows 10 or above Yes
setupconfig.ini files used for feature updatesYes


Remarks
This option is available starting in Windows 10, Version 1703.


/DynamicUpdate

Specifies whether Windows Setup will perform Dynamic Update operations (search, download, and install updates).

Syntax
/DynamicUpdate {Enable | Disable | NoDrivers | NoLCU | NoDriversNoLCU}


Parameters

Parameter Description
EnableDynamic Update operations are performed.
DisableDynamic Update operations are not performed.
NoDriversDynamic Update operations are performed except driver acquisition.
NoDriversNoLCUDynamic Update operations are performed except driver and latest cumulative update acquisition.
NoLCUDynamic Update operations are performed except latest cumulative update acquisition.


Examples

setup /auto upgrade /dynamicupdate disable


Applicability

Configuration Applicable
Setup.exe started from WinPENo
Setup.exe started from Windows 10 or above Yes
setupconfig.ini files used for feature updatesYes for Microsoft Update (MU) based feature updates; Yes for Unified Updated Platform (UUP) based feature updates only when /DynamicUpdate NoDrivers is specified


Remarks
NoDrivers, NoLCU and NoDriversNoLCU are new for Windows 10, version 2004. 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 can be used with /SkipFinalize to control Dynamic Update operations; /DynamicUpdate is ignored when used with /Finalize.


/EMSPort

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:<baudrate>]


Parameters

Parameter Description
COM1Enables EMS over COM1. Supported for x86 systems only.
COM2Enables EMS over COM2. Supported for x86 systems only.
UseBIOSSettingsuses the setting that the BIOS specifies. For x86 systems, Windows uses the value from the Serial Port Console Redirection (SPCR) table. If no SPCR table or EFI console device path is specified in the BIOS, Windows disables EMS.
OffDisables EMS. If EMS is disabled in Windows Setup, you can later enable EMS by modifying the boot settings.
<baudrate>Specifies the baud to use when Windows transfers data during debugging. The default value is 19200, but it can also be set to 57600 or 115200.


Examples

setup /emsport:COM1 /emsbaudrate:115200


Applicability

Configuration Applicable
Setup.exe started from WinPEYes
Setup.exe started from Windows 10 or above No
setupconfig.ini files used for feature updatesNo


/EULA

Instructions Windows Setup to suppress the Windows Setup end user license agreement user experience.

Syntax
/EULA accept


Examples

setup /auto upgrade /quiet /eula accept


Applicability

Configuration Applicable
Setup.exe started from WinPENo
Setup.exe started from Windows 10 or above Yes
setupconfig.ini files used for feature updatesYes


Remarks
This option is new starting with Windows 11. Specifying /EULA accept instructs Windows Setup that the end user license agreement has been accepted. Starting with Windows 11, acceptance of the Windows EULA is required before Windows Setup installation begins. By specifying /EULA accept you are agreeing that when applying this operating system either (1) the applicable Windows license was purchased though volume licensing, or (2) that you are accepting the relevant Microsoft Software License Terms. Windows Setup will return error MOSETUP_E_EULA_ACCEPT_REQUIRED (0xC190010E) if /EULA accept is not specified and (1) /Quiet is specified, or (2) if Windows Setup is started where user interaction is not supported. To learn more about licensing, see Microsoft License Terms.


/Finalize

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


Examples

setup /auto upgrade /finalize


Applicability

Configuration Applicable
Setup.exe started from WinPENo
Setup.exe started from Windows 10 or above Yes
setupconfig.ini files used for feature updatesNo


Remarks
This option is new for Windows 10, version 2004. /Finalize should not be specified with the /NoReboot option. 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. See /SkipFinalize.


/ImageIndex

Instructions Windows Setup which OS image to install from install.wim if multiple images may be applicable.

Syntax
/ImageIndex <index>


Examples

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


Applicability

Configuration Applicable
Setup.exe started from WinPEYes
Setup.exe started from Windows 10 or above Yes
setupconfig.ini files used for feature updatesYes for Microsoft Update (MU) based feature updates; No for Unified Updated Platform (UUP) based feature updates


Remarks
If multiple images are applicable, Windows Setup will prompt the user to select. 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). This may occur when the product key specified using /PKey applies to multiple OS images.


/InstallDrivers

Adds .inf-style drivers to the new Windows 10 installation.

Syntax
/InstallDrivers <location>


Parameters

Parameter Description
<location>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
Setup.exe started from WinPENo
Setup.exe started from Windows 10 or above Yes
setupconfig.ini files used for feature updatesYes


Remarks
This option is new starting in Windows 10. The driver .inf can be in a folder within the specified location. The command will recurse through the specified location.


/InstallFrom

Specifies a different Install.wim file to use during Windows Setup.

Syntax
/InstallFrom<path>


Parameters

Parameter Description
<path>The path of the .wim file to install.


Examples

setup /installfrom D:\custom.wim

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
Setup.exe started from WinPENo
Setup.exe started from Windows 10 or above Yes
setupconfig.ini files used for feature updatesNo


Remarks
This enables you to use a single preinstallation environment to install multiple versions of Windows images. 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. For more information, see “Creating a WIM for Multiple Architecture Types” in Windows Setup Supported Platforms and Cross-Platform Deployments


/InstallLangPacks

Adds language packs (lp.cab) to the new Windows 10 or above installation.

Syntax
/InstallLangPacks <location>


Parameters

Parameter Description
<location>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
Setup.exe started from WinPENo
Setup.exe started from Windows 10 or above Yes
setupconfig.ini files used for feature updatesYes for Microsoft Update (MU) based feature updates; No for Unified Updated Platform (UUP) based feature updates


Remarks
This option is new starting in Windows 10. The language packs can be in a folder within the specified <location>. 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>. See Language and region Features on Demand (FOD). In Windows 10, version 1903 and later, install failures will cause Windows Setup to fail and rollback.


/m

Instructs Windows Setup to copy alternate files from an alternate location. 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>


Parameters

Parameter Description
<folder_name>Name and the location of the folder that contains the replacement files and can be any local drive location. UNC paths are not supported.


Examples
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


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. For example, you may copy the file to the C:\Windows\i386 folder. The file name must be the same as the name that is used in Windows Setup. 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. In this example the <folder_name> is C:\additional_files, where C:\additional_files is your customized $OEM$ directory. For example: C:\additional_files$$\i386\msmsgs.ex_.

setup /m:C:\additional_files

If you change resources in your replacement files, you must add the updated Multilanguage User Interface (MUI) files to the installation.


Applicability

Configuration Applicable
Setup.exe started from WinPEYes
Setup.exe started from Windows 10 or above No
setupconfig.ini files used for feature updatesNo


Remarks
You must know where the files will be installed on the Windows installation. All the additional files must be copied to an $OEM$ folder in your installation sources or in the <folder_name>. The $OEM$ structure provides a representation of the destination installation disk:

  • $OEM$\$1 maps to %SYSTEMDRIVE%, which could be drive C.
  • $OEM$\$$ maps to %WINDIR%, which could be C:\windows.
  • $OEM$\$progs maps to the program files directory.
  • $OEM$\$docs maps to the user's My Documents folder.


/MigNEO

Tells Windows Setup to perform an upgrade of Windows without additional offline phase optimizations.

Syntax
/MigNEO Disable


Applicability

Configuration Applicable
Setup.exe started from WinPENo
Setup.exe started from Windows 10 or above Yes only with /Auto Upgrade | DataOnly
setupconfig.ini files used for feature updatesYes only with /Auto Upgrade | DataOnly


Remarks
NEO stands for Non-event Objective, a multi-release effort to reduce feature update offline time, including a single reboot for most users. This option is available starting in Windows 10, version 1803 and later.


/MigrateDrivers

Instructs Windows Setup whether to migrate the drivers from the existing installation during the upgrade.

Syntax
/MigrateDrivers {All | None}


Examples

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


Applicability

Configuration Applicable
Setup.exe started from WinPENo
Setup.exe started from Windows 10 or above Yes
setupconfig.ini files used for feature updatesYes


Remarks
You can specify All or None. By default, Windows Setup decides which is best for each individual driver based on the install choice. You can use this switch with /InstallDrivers, though it's not required.


/NetDebug

Enables kernel debugging over the network.

Syntax
/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>IP address of the host computer.
<n>Port of the host computer.
<q.r.s.t>Password to set up a secure connection.
<n.o.p>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
Setup.exe started from WinPEYes
Setup.exe started from Windows 10 or above No
setupconfig.ini files used for feature updatesNo


Remarks
Use hostip to identify the IP address of the host computer. Use port to identify the port. 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. Use nodhcp to avoid using a DHCP connection. (optional). 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

Instructs Windows Setup not to restart the computer after the down-level phase of Windows Setup completes.

Syntax
/NoReboot


Examples

setup /noreboot


Applicability

Configuration Applicable
Setup.exe started from WinPENo
Setup.exe started from Windows 10 or above Yes
setupconfig.ini files used for feature updatesNo


Remarks
This option is new for Windows 10. 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

Supplies Windows Setup with the specific product key.

Syntax
/PKey <product key>


Examples

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


Applicability

Configuration Applicable
Setup.exe started from WinPENo
Setup.exe started from Windows 10 or above Yes
setupconfig.ini files used for feature updatesYes


Remarks
This option is new starting in Windows 10.


/Priority

Tells Windows Setup to increase the thread priority from low to normal for feature updates through Windows Update.

Syntax
/Priority {Normal | Low}


Parameters

Parameter Description
NormalWindows Setup will execute with normal thread priority.
LowWindows Setup will execute with low thread priority.


Examples

setup.exe /auto upgrade /skipfinalize /priority low


Applicability

Configuration Applicable
Setup.exe started from WinPENo
Setup.exe started from Windows 10 or above Yes
setupconfig.ini files used for feature updatesYes


Remarks
This option is available starting in Windows 10, version 1709 and later. 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

After Windows Setup is complete, run a script.

Syntax
/PostOOBE<location> [\setupcomplete.cmd]


Parameters

Parameter Description
<location>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


Path to folder that contains a script with the name setupcomplete.cmd. setupcomplete.cmd is copied to $Windows.~BT to be run after OOBE.

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


Applicability

Configuration Applicable
Setup.exe started from WinPENo
Setup.exe started from Windows 10 or above Yes
setupconfig.ini files used for feature updatesYes


Remarks
This option is available starting in Windows 10.


/PostRollback

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 <location> [/PostRollbackContext {system | user}]


Parameters

Parameter Description
<location>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
Setup.exe started from WinPENo
Setup.exe started from Windows 10 or above Yes
setupconfig.ini files used for feature updatesYes


Remarks
This option is available starting in Windows 10. /PostRollbackContext option is available in Windows 10, version 1803 and later. 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. 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. For updates from Windows Update, setuprollback.cmd runs in system context, regardless of the rights of the first logged-in user. Windows Setup will copy setuprollback.cmd to $Windows.~BT to be run after OOBE.


/Quiet

This will suppress any Windows Setup user experience including the rollback user experience.

Syntax
/Quiet


Examples

setup /auto upgrade /quiet


Applicability

Configuration Applicable
Setup.exe started from WinPENo
Setup.exe started from Windows 10 or above Yes
setupconfig.ini files used for feature updatesNo


Remarks
This option is available starting in Windows 10.


/ReflectDrivers

Specifies the path to a folder that contains encryption drivers for a computer that has third-party encryption enabled.

Syntax
/ReflectDrivers <location>


Parameters

Parameter Description
<location>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
Setup.exe started from WinPENo
Setup.exe started from Windows 10 or above Yes
setupconfig.ini files used for feature updatesYes


Remarks
This option is available starting 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

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 | Disable}


Parameters

>
Parameter Description
EnableDuring installation, Windows can resize the existing Windows RE tools partition or create a new one if needed.
DisableWindows does not resize the existing Windows RE tools partition or create a new one during installation.


Examples

setup /resizerecoverypartition disable


Applicability

Configuration Applicable
Setup.exe started from WinPEYes
Setup.exe started from Windows 10 or above Yes
setupconfig.ini files used for feature updatesYes


Remarks
To learn more about Windows RE partitions, see UEFI/GPT-based hard drive partitions and BIOS/MBR-based hard drive partitions.


/ShowOOBE

Specifies whether the user is required to interactively complete the out of box experience (OOBE).

Syntax
/ShowOOBE {Full | None}


Parameters

Parameter Description
FullRequires the user to interactively complete the out of box experience (OOBE).
NoneSkips OOBE and selects the default settings.


Examples

setup.exe /auto upgrade /showoobe full


Applicability

Configuration Applicable
Setup.exe started from WinPENo
Setup.exe started from Windows 10 or above Yes
setupconfig.ini files used for feature updatesYes


Remarks
This option is available starting in Windows 10.


/SkipFinalize

Instructions setup to start update operations on the down-level OS without initiating a reboot to start the offline phase.

Syntax
/SkipFinalize


Examples

setup /auto upgrade /quiet /priority low /skipfinalize


Applicability

Configuration Applicable
Setup.exe started from WinPENo
Setup.exe started from Windows 10 or above Yes
setupconfig.ini files used for feature updatesNo


Remarks
This option is available starting in Windows 10, version 2004. /SkipFinalize will prepare the update without committing. This allows for the commit to be completed using /Finalize followed by an immediate reboot of the device. 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 will not automatically instruct Windows Setup to run silently on the down-level OS while the computer is in use. Use /Quiet to suppress the Windows Setup user experience, and /Priority Low to prevent user impact. /SkipFinalize will not invoke a reboot and thus the /NoReboot option is not required. See /Finalize.


/Telemetry

Specifies whether Windows Setup should capture and report installation data.

Syntax
/Telemetry {Enable | Disable}


Parameters

Parameter Description
EnableWindows Setup captures and reports installation data.
DisableWindows Setup does not capture and report installation data.


Examples

setup /telemetry disable


Applicability

Configuration Applicable
Setup.exe started from WinPENo
Setup.exe started from Windows 10 or above Yes
setupconfig.ini files used for feature updatesYes


/TempDrive

Instructs Windows Setup to put temporary installation files on the specified partition.

Syntax
/TempDrive <drive_letter>


Parameters

Parameter Description
<drive_letter>The partition to copy installation files to during Windows Setup.


Examples

setup /tempdrive H


Applicability

Configuration Applicable
Setup.exe started from WinPENo
Setup.exe started from Windows 10 or above Yes
setupconfig.ini files used for feature updatesYes


Remarks
This option is available starting in Windows 10, version 1607. For an upgrade, the /TempDrive option affects only the placement of temporary files. The operating system is upgraded in the partition from which you run the setup.exe file.


/Unattend

Enables you to use an answer file with Windows Setup.

Syntax
/Unattend:<answer_file>


Parameters

Parameter Description
<answer_file>The file path and file name of the unattended Windows Setup answer file.


Examples

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


Applicability

Configuration Applicable
Setup.exe started from WinPEYes
Setup.exe started from Windows 10 or above No
setupconfig.ini files used for feature updatesNo


Remarks
This is known as an unattended installation. You must specify a value for <answer_file>. Windows Setup applies the values in the answer file during installation. When /Unattend is used, /Auto cannot be used.


/Uninstall

Determines whether Windows will include controls that allow the user to go back to the previous operating system.

Syntax
/Uninstall {Enable | Disable}


Parameters

Parameter Description
EnableWindows Setup includes controls that allow the user to go back to the previous operating system.
DisableWindows Setup does not includes controls that allow the user to go back to the previous operating system.


Examples

setup /uninstall disable


Applicability

Configuration Applicable
Setup.exe started from WinPENo
Setup.exe started from Windows 10 or above Yes
setupconfig.ini files used for feature updatesYes


Remarks
This option is available starting in Windows 10.


/USBDebug

Sets up debugging on a USB port.

Syntax
/USBDebug:<hostname>


Parameters

Parameter Description
<hostname>The name of the computer to debug.


Examples

setup /usbdebug:testmachine01


Applicability

Configuration Applicable
Setup.exe started from WinPEYes
Setup.exe started from Windows 10 or above No
setupconfig.ini files used for feature updatesNo


Remarks
Debug data is effective on the next reboot.


/WDSDiscover

Specifies that the Windows Deployment Services (WDS) client should be in discover mode.

Syntax
/WDSDiscover


Examples
To start the WDS client in dynamic discover mode, run the following command:

setup /wds /wdsdiscover


Applicability

Configuration Applicable
Setup.exe started from WinPEYes
Setup.exe started from Windows 10 or above No
setupconfig.ini files used for feature updatesNo


Remarks
This option is no longer available starting in Windows 11, version 21H2. If you do not specify /WDSServer WDS searches for a server.


/WDSServer

Specifies the name of the Windows Deployment Services (WDS) server that the client should connect to.

Syntax
/WDSServer:<servername>


Parameters

Parameter Description
<servername>The name of the Windows Deployment Services server.


Examples
To start the Windows Deployment Services client in static discover mode, run the following command:

setup /wds /wdsdiscover /wdsserver:MyWDSServer


Applicability

Configuration Applicable
Setup.exe started from WinPEYes
Setup.exe started from Windows 10 or above No
setupconfig.ini files used for feature updatesNo


Remarks
This option is no longer available starting in Windows 11, version 21H2. To use this setting, you must also use the /WDSDiscover option. <servername> can be an IP address, a NetBIOS name, or a fully qualified domain name (FQDN).

Windows Setup Exit Codes

Exit Code Name Exit Code Value Description
CONX_SETUP_EXITCODE_CONTINUE_REBOOT0x3This upgrade was successful.
CONX_SETUP_EXITCODE_RESUME_AT_COMPAT_REPORT0x5The compatibility check detected issues that require resolution before the upgrade can continue.
CONX_SETUP_EXITCODE_AUTO_INSTALL_FAIL0x7The installation option (upgrade or data only) was not available.


Windows Setup States

Windows Setup Edition Configuration and Product ID Files (EI.cfg and PID.txt)

Windows Setup Log Files and Event Logs