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 article we’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>
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 2004 (May 2020 Update).
You can create an ISO image with the current Windows 10 build using the Media Creation Tool.
- Download the Media Creation Tool (https://www.microsoft.com/en-us/software-download/windows10);
- Run the MediaCreationTool2004.exe and specify that you want to Create installation media (USB flash drive, DVD, or ISO file) in the wizard;
- Select the language, edition and architecture of the Windows 10 image you want to create;
- Check the ISO file and enter the file name for it;
- Wait till Media Creation Tool has downloaded Windows 10 installation image to your local drive.
Extract the contents of the ISO image to your file server.
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
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 ****************
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
This is the check result code.
You can also get an error code for the upgrade compatibility check in the command prompt:
echo %errorlevel%
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.
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.
setupdiag.exe
console 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:
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
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 /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
1 comment
You can get the following error then trying to upgrade your Windows 10 build:
You can’t keep Windows settings, personal files, and apps because your current version of Windows might be installed in a unsupported directory.
The source of the problem is that upgrade wizard could not find default Windows 10 app folders
To fix this:
– Run the regedit.exe;
– Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion;
– Find the registry parameter named ProgramFilesDir. It must contain the full path to the directory where the system ‘Program Files’ folder is kept. If your system is installed on drive C:, the value of this parameter must be C:\Program Files. If the system is installed on another drive, the path will be different, for example, E:\Program Files;
-Edit the value of this parameter so that it contains the full path to Program Files directory in your Windows 10 installation; ProgramFilesDir path in registry
I-n the same way, check the values of the following parameters: ProgramFilesDir(x86), ProgramFilesPath and ProgramW6432Dir. If Windows 10 is installed on the C: drive, the following paths should be listed there:ProgramFilesDir(x86) = C:\Program Files (x86)
ProgramFilesPath = C:\Program Files
ProgramW6432Dir = C:\Program Files