Skip to main content
Windows 10

Upgrading Windows 10 Build with Setup.exe Command-Line Switches

By November 16, 2020December 22nd, 2020No Comments

The setup.exe installer in a Windows 10 install image has quite a large number of the command-line parameters that administrators may be interested in to automate and manage a Windows 10 silent and unattended build upgrade on user computers using SCCM, MDT, or other deployment tools. In this post I’ll show how to use Windows 10 setup.exe parameters during compatibility check and upgrading to the latest Windows 10 build.

Windows 10 Setup.exe Command-Line Options

To upgrade a Windows 10 build, a Windows install program setup.exe is used. When you run it, a graphical Windows 10 update wizard appears. However, this program has a great number of command-line parameters you can use to automatic OS upgrade on users computers. The general syntax and parameters of Setup.exe are listed below:

/1394Debug:<channel>
[BaudRate:<baudrate>]
/AddBootMgrLast
/Auto {Clean | DataOnly | Upgrade}
/BitLocker {AlwaysSuspend | TryKeepActive | ForceKeepActive}
/BusParams:<bus.device.function>
/CompactOS {Enable / Disable}
/Compat {IgnoreWarning / ScanOnly}
/CopyLogs<location>
/Debug:<port> [BaudRate:<baudrate>]
/DiagnosticPrompt {enable | disable}
/DynamicUpdate {enable | disable}
/EMSPort: {COM1 | COM2 | off} [/emsbaudrate:<baudrate>]
/InstallDrivers<location>
/InstallFrom<path>
/InstallLangPacks<location>
/m:<folder_name>
/MigNEO Disable
/MigrateDrivers {all | none}
/NetDebug:hostip=<w.x.y.z>,port=<n>,key= <q.r.s.t>[,nodhcp][,busparams=n.o.p]
/NoReboot
/PKey<product key>
/Priority Normal
/PostOOBE<location> [\setupcomplete.cmd]
/PostRollback<location> [\setuprollback.cmd] [/postrollbackcontext {system / user}]
/Quiet
/ReflectDrivers<location>
/ResizeRecoveryPartition {Enable / Disable}
/ShowOOBE {full / none}
/Telemetry {Enable / Disable}
/TempDrive <drive_letter>
/Unattend:<answer_file>
/Uninstall {enable / disable}
/USBDebug:<hostname>
/WDSDiscover
/WDSServer:<servername>
windows 10 setup exe command-line parameters

You can get the detailed information about all setup.exe command-line options and their features for Windows 10 on the documentation page: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-command-line-options

How to Create an Up-to-Date Windows 10 Install ISO Image?

To upgrade your Windows 10 build, you must get an installation ISO image with the latest Windows 10 version. Today it is Windows 10 20H2 (October 2020 Update).

You can create an ISO image with the current Windows 10 build using the Media Creation Tool.

  1. Download the Media Creation Tool (https://www.microsoft.com/en-us/software-download/windows10);
  2. Run the MediaCreationTool20H2.exe and specify that you want to Create installation media (USB flash drive, DVD, or ISO file) in the wizard; MediaCreationTool Create Windows 10 install media
  3. Select the language, edition and architecture of the Windows 10 image you want to create; select windows 10 language,edition and architecture
  4. Check the ISO file and enter the file name for it;media creation tool create iso image
  5. Wait till Media Creation Tool has downloaded Windows 10 installation image to your local drive. downloading win 10 install image

Extract the contents of the ISO image to your file server.

extract windows 10 iso image to folder

Using Windows 10 Compatibility Check Before Upgrading Build

Before upgrading OS on your computer, you can check if your Windows 10 may be upgraded to the build the new ISO image contains. To do it, run this command:

start /wait setup.exe /Auto Upgrade /Quiet /NoReboot /DynamicUpdate Disable /Compat ScanOnly

windows 10 setup.exe Compatibility Check Auto Upgrade Compat ScanOnly

The parameters you can use:

  • /Auto Upgrade – automatic upgrade mode
  • /Quiet – hides the upgrade wizard dialog windows
  • /NoReboot – disables the computer restart
  • /DynamicUpdate Disable — sets that you don’t need to download the latest updates through Windows Update (you can download them later automatically using wuauserv or manually)
  • /Compat ScanOnly – performs the compatibility check only (without performing build upgrade).

Scanning for the compatibility with a new Windows 10 build will take some time.

You can track the compatibility check process in the file C:\$Windows.~BT\Sources\Panther\setupact.log. If the scan check is over, you will see the following line in it:

Info MOUPG **************** SetupHost Logging End ****************
windows setupact.log

You can view the compatibility analysis results in C:\$Windows.~BT\Sources\Panther\setuperr.log. Find the last line that looks like this:

CSetupHost::Execute(xxx): Result = xxxxxxxx
win 10 upgrade error log file setuperr.log

This is the check result code.

You can also get an error code for the upgrade compatibility check in the command prompt:

echo %errorlevel% The scan resulting code must be converted to the hexadecimal format.

For example, the setup.exe command has returned -1047526896. Copy and paste the decimal code to the calculator in the programmer mode. To get the hexadecimal error code, copy the value from the Hex box, remove all Fs in the beginning and add 0x instead. In my case, I have got 0xC1900210.

converting dec to hex error code

The most typical Windows 10 compatibility check error codes are:

  • 0xC1900210 – no problems found;
  • 0xC1900208 – a compatibility problem found;
  • 0xC1900204 and 0xC190010E – automatic build upgrade impossible (wrong Windows edition or architecture);
  • 0xC1900200 – the computer doesn’t meet minimum Windows 10 hardware requirements;
  • 0xC190020E – not enough disk space;
  • 0xC1420127 – a problem when unmounting the image WIM file.

You can get the detailed information about why you cannot upgrade your Windows 10 build using the setupdiag.exe tool.

In my case, there was the following error in setuperr.log:

Error MOUPG CSetupHost::Execute(412): Result = 0xC1900208[gle=0x00000003]

Check the SetupDiagResults.log created by SetupDiag. The log shows that there are two reasons that prevent my computer from upgrading the Windows 10 build:

  • CompatBlockedApplicationAutoUninstall — an incompatible app was found, and I have to uninstall it prior to the upgrade.
  • FindAbruptDownlevelFailure — the information about the last error when writing entries to the log has been suddenly interrupted.
Matching Profile found: CompatBlockedApplicationAutoUninstall, FindAbruptDownlevelFailure - BEBA5BC6-6150-413E-8ACE-5E1EC8D34DD5, 55882B1A-DA3E-408A-9076-23B22A0472BD

SetupDiag version: 1.6.0.0

In the end, there is the recommendation to uninstall the McAfee antivirus before the upgrade:

setupdiag log file
You must uninstall "McAfee VirusScan Enterprise" before continuing with the installation/update.

If you have SCCM, you can centrally collect the values of error level status from user computers with a simple package and advertisement with the command: setup.exe /Compat ScanOnly

sccm: check your computer compatibility before upgrading windows 10 build

How to Automate Windows 10 In-Place Upgrade from the Command Prompt?

If no compatibility problems have been found that prevent your Windows 10 build from upgrading, you can run the upgrade on a computer using a simple command-line script. Create a BAT file run_win10_upgrade.bat with the following code in the shared network share containing the extracted Windows 10 ISO image:

start /wait .\ W102004\Windows10x64-2004\setup.exe /auto upgrade /DynamicUpdate disable /showoobe None /Telemetry DisableThe /Auto:Upgrade mode keeps all apps and user data after the upgrade. You can also use the /auto:data mode if you want to keep the user data only.

The /migratedrivers all parameter is used to force migrate all drivers. If the parameter is not set, the installer will itself make a decision on each driver individually.

You can use other setup.exe options when upgrading Windows 10.

Starting from Windows 10 1607, you can set the installation parameters in the Setupconfig.ini file. This file must be placed in the folder with setup.exe and contain the text like this matching the command above:

[SetupConfig]
NoReboot
ShowOobe=None
Telemetry=Disable
DynamicUpdate=Disable

To run Windows 10 upgrade using the parameter file, the following command is used:

Setup.exe /ConfigFile setupconfig.ini

Leave a Reply