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

The setup. exe installer in a Windows 10 install image has quite a large number of the command-line parameters that administrators may be enthusiastic about in order to automate and handle a Windows 10 silent and unwatched build upgrade on a users computers making use of SCCM, MDT, or even other deployment software. In this post we’ll be using Windows 10 setup. exe  in order to upgrade the latest windows 10 Home build.

Windows 10 Setup.exe Command-Line Options

In order to upgrade the Windows 10 build, the Windows set up program setup.exe is utilized. When ran, a Windows 10 update GUI appears. This program has a great number of command-line parameters you can use to automate 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 download an ISO image with the latest Windows 10 version.

You can create an ISO with the latest 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 MediaCreationTool2004.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 wish to create; select windows 10 language,edition and architecture
  4. Check the ISO file and enter the filenamemedia creation tool create iso image
  5. Wait utill Media Creation Tool has downloaded Windows 10 installationdownloading win 10 install image

Extract the contents of the ISO image

extract windows 10 iso image to folder

Using Windows 10 Compatibility Check Before Upgrading Build

Before upgrading Windows 10 on your computer, you can check if your current build will be compatible. 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).

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

Info MOUPG **************** SetupHost Logging End ****************

windows setupact.log

You can view the compatibility analysis results in C:\$Windows.~BT\Sources\Panther\setuperr.log.

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 compatibility check in the command prompt by running the below command.

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.

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 Disable

The /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.

Starting through Windows 10 1607, a person can place the set up parameters within the Setupconfig.in file. This particular file should be put within the folder along with setup.exe and retain the text such as this matching the particular command :

[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

If you found this article helpful, would you consider buying me a Coffee?