Windows OS Hub
  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux

 Windows OS Hub / Windows 11 / How to Upgrade Windows Build from an ISO File with Setup.exe CMD

November 7, 2024 Windows 10Windows 11

How to Upgrade Windows Build from an ISO File with Setup.exe CMD

The standard setup.exe installer in the Windows distro can be used to interactively install the operating system or update the OS version (install the feature update) on the computer. In addition to the interactive mode, setup.exe supports a large number of command line parameters that can be useful to sysadmins. You can use the setup.exe parameters to automate the Windows 10/11 build (version) update on users’ computers using SCCM, MDT, or other tools in disconnected (offline) environments.

Contents:
  • Windows 11 Setup.exe Command-Line Options
  • How to Get the Latest Windows 11 ISO Image
  • Windows 11 Pre-Update Validation (Compatibility Check) with Setup.exe
  • Silent Windows 11 Build Update from Command-Line

In this article, we’ll show how to get an installation ISO image with the latest Windows 11 build (24H2 in our example), use the command-line parameters of setup.exe to check your computer’s compatibility with the new version of Windows, and perform a background in-place upgrade.

Windows 11 Setup.exe Command-Line Options

If you normally run the Windows Installer (setup.exe) from the installation ISO, the graphical installation/upgrade wizard will appear. However, setup.exe has many command-line parameters that you can use to configure the process of updating the operating system version (up to a fully automated silent build update scenario).

The general syntax and available command-line 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>

The list of available installation options can be displayed as follows:

setup.exe /?

windows 10 setup exe command-line parameters

See the documentation page for detailed information on all setup.exe command-line options and possible values: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-command-line-options?view=windows-11

How to Get the Latest Windows 11 ISO Image

To offline update the current OS build on a computer, you’ll need to get an ISO installation image with the latest version of Windows 11 (currently Windows 11 24H2).

You can generate an installation ISO image using the official Media Creation Tool or download the latest Windows 11 multi-edition x64 ISO from the Microsoft download page (https://www.microsoft.com/en-us/software-download/windows11).

How to Get the Latest Windows 11 ISO Image

Mount the ISO image in Windows and extract the image contents to a file server folder.

Mount and extract Windows ISO to a local folder

Windows 11 Pre-Update Validation (Compatibility Check) with Setup.exe

Before you start the operating system update, make sure your computer is compatible with the new build of Windows 11 in the installation ISO image. Open an elevated command prompt, go to the directory with the image, and run:

cd c:\Iso\W1124h2
start /wait SETUP.EXE /Auto Upgrade /NoReboot /DynamicUpdate Disable /Compat ScanOnly

The following setup.exe parameters are used:

  • /Auto Upgrade – automatic build update mode;
  • /NoReboot – prevent computer reboot
  • /DynamicUpdate Disable — do not download the latest security updates and patches from Windows Update;
  • /Compat ScanOnly – run the compatibility check only, without performing the build update.

Windows Setup runs compatibility checks and then exits (without completing the installation) with an exit code to indicate if there are compatibility issues. In this case, Windows Setup reported that the build update is not possible because the computer does not meet the requirements due to the insufficient size of the system disk.

setup.exe /compat scanonly option used to check compatibility

By adding the Quiet parameter, you can hide the graphical  Windows 11 Setup Update Wizard prompts and return only the exit code.

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

When the pre-update scan is complete, print the exit code:

echo %errorlevel%

This variable contains the status of the compatibility check.

Get setup.exe update validation exitcode

In our case, the exit code returned is -1047526912. What does this value mean? (The hexadecimal error code is given in parentheses. It can be obtained in the calculator by converting DEC to HEX.)

  • -1047526896 (0xC1900210) – Windows Setup reports that no compatibility concerns were found
  • -1047526912 (0xC1900200) – this computer is not compatible with Windows 11 hardware requirements (Learn how to upgrade to Windows 11 on unsupported hardware)
  • -1047526904 (0xC1900208) – incompatible environment (hard block)
  • -1047526898 (0xC190020E) – insufficient free disk space
  • -1047526908 (0xC1900204) – wrong Windows edition or architecture

converting dec to hex error code

SETUPACT.LOG and SETUPERR.LOG files in C:\$Windows.~BT\Sources\Panther\ contain the detailed compatibility check results and errors. These log files are created by setup.exe during the compatibility check.
For more information about why you cannot update to a new Windows 11 build, use the setupdiag.exe tool.

If you have SCCM, Intune or similar tool, you can centrally collect the compatibility check codes (errorlevel) from users’ computers with a simple package and advertisement:

setup.exe /Compat ScanOnly ...

sccm: check your computer compatibility before upgrading windows 10 build

Silent Windows 11 Build Update from Command-Line

If you have not identified any compatibility issues that prevent you from updating to a new Windows build, you can use a simple script to automatically update to a newer version of the operating system in silent mode.

Create a batch file named run_win_upgrade.bat in the shared folder that contains the Windows 11 source installation files. For example, I add the following update command to the file:

start /wait .\W1124h2\setup.exe /auto upgrade /DynamicUpdate disable /showoobe None /Telemetry Disable /Copylogs %SystemDrive%\temp /EULA Accept /compat IgnoreWarning /NoReboot

Silent upgrade Windows 11 build with setup.exe cmd-line options

The following build update options are used:

  • /Auto:Upgrade – keep all installed apps and user data.
  • /ShowOOBENone  – skip the Out-of-Box Experience (OOBE) screen after a Windows update
  • You can add the parameter /migratedrivers all. Can be used to force the migration of all drivers If the parameter is not specified, the installer makes decisions for each driver individually.
  • /Copylogs %SystemDrive%\temp – write the update logs to the specified directory.
  • /Telemetry Disable – do not collect and report installation data from Windows Setup
  • /EULA Accept – accept the license agreement
  • /Unattend:unattend.xml – allows to specify an unattended Windows Setup answer file (not used in this example)
  • /Quiet – perform silent (background) build update. Windows Setup graphical dialogs are not displayed to the user. Use this option for automatic build update scenarios.
  • /Priority low|normal – increase or decrease the priority of the Windows Setup process
  • /CompactOS enable|disable – enable or disable file compression using the Compact OS feature (saves disk space)
  • /BitLocker AlwaysSuspend — suspend BitLocker encryption during upgrade
  • /Compat IgnoreWarning – ignore any incompatibility warnings that can be skipped.
  • /NoReboot – do not automatically restart the computer after an update is complete.

In place upgrade Windows version from an offline ISO file

Starting with Windows 10 1607, you can specify installation options in the Setupconfig.ini file. This file must be placed in the same folder as setup.exe and contain the update options that match 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
13
Facebook Twitter Google + Pinterest
previous post
KVM: How to Expand or Shrink a Virtual Machine Disk Size?
next post
Backing Up Active Directory with Windows Server Backup

Related Reading

How to Cancel Windows Update Pending Restart Loop

May 6, 2025

View Windows Update History with PowerShell (CMD)

April 30, 2025

Change BIOS from Legacy to UEFI without Reinstalling...

April 21, 2025

Remove ‘Your License isn’t Genuine’ Banner in MS...

April 21, 2025

Uninstalling Windows Updates via CMD/PowerShell

April 18, 2025

1 comment

dk May 11, 2023 - 6:18 am

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

Reply

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

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

  • Cannot Install Network Adapter Drivers on Windows Server

    April 29, 2025
  • Change BIOS from Legacy to UEFI without Reinstalling Windows

    April 21, 2025
  • How to Prefer IPv4 over IPv6 in Windows Networks

    April 9, 2025
  • Load Drivers from WinPE or Recovery CMD

    March 26, 2025
  • How to Block Common (Weak) Passwords in Active Directory

    March 25, 2025
  • Fix: The referenced assembly could not be found error (0x80073701) on Windows

    March 17, 2025
  • Exclude a Specific User or Computer from Group Policy

    March 12, 2025
  • AD Domain Join: Computer Account Re-use Blocked

    March 11, 2025
  • How to Write Logs to the Windows Event Viewer from PowerShell/CMD

    March 3, 2025
  • How to Hide (Block) a Specific Windows Update

    February 25, 2025

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • How to Download Offline Installer (APPX/MSIX) for Microsoft Store App
  • Fix: Windows Cannot Connect to a Shared Printer
  • How to Disable UAC Prompt for Specific Applications in Windows
  • Fix: The Computer Restarted Unexpectedly or Encountered an Unexpected Error on Windows
  • How to Clean Up System Volume Information Folder on Windows
  • Fixing “Winload.efi is Missing or Contains Errors” in Windows 10
  • How to Enable Windows Auto Login without a Password
Footer Logo

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


Back To Top