The Windows 10 installation or upgrade is done using the setup executable. This setup.exe file is found within the image file for the installation media and is used to upgrade or install a fresh copy of Windows 10 on the computer. If you wish to modify the behavior of the Windows installation, you can do so using the Windows 10 setup command prompt switches.
Here, we shall take a look at some of the Windows 10 setup.exe command line switches, and how you can use them to modify the way Windows installs on your computer.
How To Launch Command Prompt At Setup?
To alter the behavior of the setup program, you will need to launch the command prompt from the setup menu. To do this, you can use the keyboard shortcut, which is Shift + F10.
Windows 10 Setup Command Prompt Switches
Note: You can find the parameters for any switch using the attribute ‘/?’ next to the command line switch
There are many command line switches that can be used to alter the way your windows installation behaves. here are some of these discussed below.
1. /auto (Windows 10 Silent Upgrade)
this switch is used to automate the installation process, along with a migration choice for the installation. when used, the media setup user interface and progress screens are displayed by default, but no user input is required and the installation is automatically completed. This is the command you will use for Windows 10 unattended upgrade.
The following settings will be applied:
- EULA will be accepted.
- Dynamic Update will be enabled.
- Telemetry and Data Upload will be opted in.
- OOBE will be skipped.
- PBR will be created.
The supported parameters include Upgrade; DataOnly; Clean
Syntax: setup.exe /auto upgrade
For Windows 10 unattended upgrade if you wish to use the answer files, you will have to use this command line switch. Note that the /auto switch parameter does not work with this switch. Answer files are XML based files that contain the configuration settings and their values, which Windows setup will use during the installation and upgrade.
Syntax: setup.exe /unattend:\\server\share\unattend.xml
If you wish to install the setup with an option to revert to the previous version, you can use this switch to include that control. You can toggle this switch using the Enable or Disable parameters.
Syntax: setup.exe /auto upgrade /uninstall disable
The quiet switch is used to hide all the user elements during the process of installing the operating system. It will also hide the rollback user interface. This is one of the methods if you wish to leave the upgrade to run in the background while you work on other things.
Syntax: setup.exe /auto upgrade /quiet
With this particular switch, You can direct Windows set up two alter the thread priority according to how much resources you want the setup program to use. you can use the normal and low parameters to increase or decrease the thread priority to the Windows setup.
syntax: setup.exe /auto upgrade /priority low
When Installing a new copy of the Windows operating system, the set up scans the system requirements to check if your device is compatible with the operating system or not. you can either ignore the compatibility issues or make the setup return an exit code for any compatibility issues as found.
The parameters to control this Switch are IgnoreWarning and ScanOnly, which performs the actions mentioned above respectively.
Syntax: setup.exe /auto upgrade /compat ScanOnly
If you are running low on system space, you can use this switch to store the temporary installation files on a specified partition. The switch takes the target drive letter as the parameter, allowing you to specify where you can put the temporary installation files.
Syntax: setup.exe /tempdrive E
If you are working on some important component while upgrading your computer, you can use this switch to prevent the computer from rebooting automatically upon completion of certain low level tasks. Instead, have the setup will continue when you reboot the PC next time.
Syntax: setup.exe /auto upgrade /noreboot
Starting with version 2004, you can use this parameter to start the offline part of the installation without committing (unlike the /noreboot switch). The primary difference between this switch and the /noreboot switch is that you will need to use the /Finalize switch after you reboot the PC.
Syntax: setup.exe /auto upgrade /prioriy low /skipfinalize
The dynamic update refers to automatically searching and downloading the latest updates when you upgrade to a higher version of Windows 10. you can use this switch to specify if you want to search and download have the latest updates from Microsoft servers.
it can be toggled using the parameters Enable and Disable.
syntax: setup.exe /auto upgrade /DynamicUpdate Disable
If you bought your copy of windows from an offline store, you may be supplied with the product key which you will require during upgrading or reinstalling your copy of Windows 10. you may not be required to use this parameter when you are using a media that contains the product ID in the sources folder (look for pid.txt).
For this command line switch, you will use the 25 digit product key.
Syntax: setup.exe /auto upgrade /pkey (enter your 25 digit product key without the brackets)
If you are upgrading to Windows 10 Pro or higher, That has BitLocker drive encryption, you can use this switch and the parameters to Alter the status of BitLocker drive encryption during the upgrade process. The switch supports three parameters, which are discussed below:
- AlwaysSuspend: BitLocker drive encryption is kept suspended during the upgrade process. if you do not add a parameter this is the default behavior of the setup.exe app.
- TryKeepActive: if you hard working on your computer while the upgrade process is running in the background, you can use this parameter to try the upgrade without suspending the drive encryption. If the upgrade process fails, BitLocker will be suspended and the upgrade process will continue.
- ForceKeepActive: this parameter will prevent the setup executable from suspending BitLocker. instead, the upgrade will fail if it cannot be completed.
syntax: setup.exe /auto upgrade /bitlocker AlwaysSuspend
This is a new Windows setup command prompt switch added to Windows 10, Which allows the installation of language packs to the new installation of the operating system. This switch takes the location parameter and you will need to specify where the installation should look for the language packs.
syntax: setup.exe /auto upgrade /installlangpacks C:\Username\Languages\Spanish
You can use this parameter to specify a location that contains .inf drivers during the setup process on your Windows 10 system. this switch takes the location parameter, where you will specify the pathname of the folder with the drivers.
syntax: setup.exe /auto upgrade /InstallDrivers C:\Username\drivers /noreboot
If you use a lot of peripherals with your device, you may be looking to migrate the drivers from existing installation in order to avoid downloading the required drivers again. This switch will help you achieve this, as you can use the parameters to migrate all the existing drivers or none of them which will allow you to download the latest version of your device drivers.
Syntax: setup.exe /auto upgrade /migratedrivers none
If you get one of the failure exit codes (check below), you can use this command line switch to copy the failure log to a local file. Do note that you may require admin permissions to copy the logs to a local folder, as this command runs under the System context.
Syntax: setup.exe /copylogs \\server\share\
Windows 10 Setup Command Prompt Exit Codes
When you use the command line switches mentioned above, you may one of the following exit codes. Here is a brief description of what each exit code means:
CONX_SETUP_EXITCODE_CONTINUE_REBOOT = The upgrade process was completed successfully.
CONX_SETUP_EXITCODE_RESUME_AT_COMPAT_REPORT = This means that the setup executable found some compatibility errors, which you will need to resolve before you can continue the upgrade process.
CONX_SETUP_EXITCODE_AUTO_INSTALL_FAIL = This means that the setup option could not be completed because the upgrade data was not accessible.
So there you have it. Now you know the popular Windows 10 setup command prompt switches that you can use to modify the behavior of the setup program. You can find more setup commands on the Microsoft Docs page. Comment below if you found this useful, and to discuss further the same.