Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

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

May 28, 2020 SCCMWindows 10

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

Contents:
  • Windows 10 Setup.exe Command-Line Options
  • How to Create an Up-to-Date Windows 10 Install ISO Image?
  • Using Windows 10 Compatibility Check Before Upgrading Build
  • How to Automate Windows 10 In-Place Upgrade from the Command Prompt?

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 2004 (May 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 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 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 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:

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

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

0 comment
8
Facebook Twitter Google + Pinterest
previous post
KVM: How to Expand or Shrink a Virtual Machine Disk Size?
next post
How to Backup Active Directory Domain Controller?

Related Reading

Configure User’s Folder Redirection with Group Policy

February 3, 2023

Disable Built-in PDF Viewer in Microsoft Edge

February 3, 2023

Join a Windows Computer to an Active Directory...

February 2, 2023

Using Previous Command History in PowerShell Console

January 31, 2023

How to Install the PowerShell Active Directory Module...

January 31, 2023

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Configure User’s Folder Redirection with Group Policy

    February 3, 2023
  • Using Previous Command History in PowerShell Console

    January 31, 2023
  • How to Install the PowerShell Active Directory Module and Manage AD?

    January 31, 2023
  • Finding Duplicate E-mail (SMTP) Addresses in Exchange

    January 27, 2023
  • How to Delete Old User Profiles in Windows?

    January 25, 2023
  • How to Install Free VMware Hypervisor (ESXi)?

    January 24, 2023
  • How to Enable TLS 1.2 on Windows?

    January 18, 2023
  • Allow or Prevent Non-Admin Users from Reboot/Shutdown Windows

    January 17, 2023
  • Fix: Can’t Extend Volume in Windows

    January 12, 2023
  • Wi-Fi (Internet) Disconnects After Sleep or Hibernation on Windows 10/11

    January 11, 2023

Follow us

woshub.com
  • Facebook
  • Twitter
  • RSS
Popular Posts
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top