- Upgrading Windows 10 Build with Setup.exe Command-Line Switches
- 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 в Windows 10
- Генерация актуального ISO образа Windows 10
- Проверка совместимости (возможности апгрейда) Windows 10
- Автоматизация обновления версии Windows 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.
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:
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:
You can view the compatibility analysis results in C:\$Windows.
BT\Sources\Panther\setuperr.log. Find the last line that looks like this:
This is the check result code.
You can also get an error code for the upgrade compatibility check in the command prompt:
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.
In my case, there was the following error in setuperr.log:
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.
In the end, there is the recommendation to uninstall the McAfee antivirus before the upgrade:
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:
To run Windows 10 upgrade using the parameter file, the following command is used:
Обновление билда Windows 10 из командной строки
Установщик setup.exe в дистрибутиве Windows 10 имеет довольно большой набор параметров командной строки, который может быть интересен администратором для автоматизации и управления обновлением билда (версии/сборки) Windows 10 на компьютерах пользователей с помощью SCCM и других инструментов. В этой статье мы покажем, как использовать параметры setup.exe при выполнении обновления и проверки совместимости с новым билдом Windows 10 .
Параметры установщика Setup.exe в Windows 10
Для обновления билда Windows 10 используется программа установки Windows setup.exe. При обычном запуске setup.exe запускается графический мастер обновления Windows 10, однако у данной программы имеется большое количество параметров командной строки, которые можно использовать для автоматизации обновления ОС на компьютерах пользователей. Общий синтаксис и параметры Setup.exe перечислены ниже:
Подробную информацию об всех опциях setup.exe и их значениях для Windows 10 можно получить на странице документации: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-command-line-options
Генерация актуального ISO образа Windows 10
Чтобы выполнить обновление версии Windows 10б, вам нужно получить установочный ISO образ с последней версией Windows 10. На данный момент это Windows 10 1903.
Вы можете создать ISO образ с актуальной версией Windows 10 с помощью Media Creation Tool.
- Скачайте Media creation tool (https://www.microsoft.com/ru-ru/software-download/windows10);
- Запустите файл MediaCreationTool1903.exe и с помощью мастера укажите, что вы хотите “Создать установочный носитель (USB-устройство, флеш памяти, DVD-диск или ISO файл)”;
- Выберите язык, редакцию и архитектуру (x64 или x86) образа Windows 10, который вы хотите создать;
- Укажите, что вы хотите создать ISO-файл и укажите желаемое имя файла;
- И дождитесь, пока Media Creation Tool закончит загрузку установочного ISO образа Windows 10 на ваш локальный диск.
Распакуйте содержимое ISO образа на файловый сервер.
Проверка совместимости (возможности апгрейда) Windows 10
Перед апгрейдом версии Windows 10 вы можете проверить, возможно ли обновить ваш билд Windows 10 до версии, которая содержится в указанном образе. Для этого выполните команду:
start /wait setup.exe /Auto Upgrade /Quiet /NoReboot /DynamicUpdate Disable /Compat ScanOnly
- /Auto Upgrade – автоматический режим обновления;
- /Quiet – скрыть диалоговые окна мастера обновления;
- /NoReboot – запретить перезагрузку компьютера;
- /DynamicUpdate Disable — указывает, что не нужно загружать последние обновления через Windows Update;
- /Compat ScanOnly – выполнить только проверку совместимости, без выполнения обновления.
Сканирование компьютера на совместимости с новый билдом Windows 10 займет некоторое время.
Вы можете отслеживать завершение процесса сканирования системы с помощью файла C:\$Windows.
BT\Sources\Panther\setupact.log. Сканирование завершено, если в файле содержится строка:
Результаты анализа на совместимость содержаться в файле C:\$Windows.
BT\Sources\Panther\setuperr.log. Найдите последнюю строку, которая выглядит так:
Это и есть код результата проверки.
Кроме того, вы можете получить код ошибки при проверке совместимости обновления из командной строки:
Например, команда вернула вам код -1047526896. Вам нужно с помощью калькулятора в режиме “Программист” вставить код ошибки в десятичном режиме (Dec). Чтобы получить шестнадцатеричный код ошибки, скопируйте значение из поля Hex, отбросив все F в начале и добавив в начало 0x. Например, в моем случае получился код 0xC1900210.
Наиболее распространение коды проверки совместимости ОС с новой версией Windows 10:
- 0xC1900210 – проблем не найдено:
- 0xC1900208 – выявлена проблема совместимости;
- 0xC1900204 и 0xC190010E – невозможно автоматическое обновление (неверный редакция или архитектура Windows);
- 0xC1900200 – компьютер не соответствует минимальным требования для Windows 10l
- 0xC190020E – недостаточно места на диске;
- 0xC1420127 – проблема при отключении WIM файла образа.
В моем случае в логе setuperr.log присутствовала ошибка:
Смотрим лог SetupDiagResults.log, который сформировала утилита SetupDiag. В логе указано, что есть две причины, которые мешают выполнить апгрейд Windows 10:
- CompatBlockedApplicationAutoUninstall — найдено несовместимое приложение, которое нужно удалить перед апгрейдом версии.
- FindAbruptDownlevelFailure — информация о последней ошибке, когда записи в журнале неожиданно обрываются.
При этом в конце журнала указано, что перед обновлением нужно удалить установленный антивирус McAfee.
При наличии SCCM вы можете централизованно собрать значения статуса errorlevel с компьютеров пользователей простым пакетом с командой setup.exe /Compat ScanOnly …. .
Автоматизация обновления версии Windows 10 из командной строки
Если вы не выявили проблем совместимости, которые мешают обновлению билда Windows 10, вы можете запустить обновление на компьютере с помощью простого скрипта. Создайте в сетевой папке с распакованным дистрибутивом Windows 10 простой bat файл run_win10_upgrade.bat со следующим кодом:
start /wait .\ W101903\Windows10x64-1903_ru\setup.exe /auto upgrade /DynamicUpdate disable /showoobe None /Telemetry Disable
Параметр /migratedrivers all – используется для принудительного переноса всех драйверов. Если параметр не задан, установщик сам принимает решения по каждому драйверу индивидуально.
Вы можете использовать другие опции setup.exe при обновлении Windows 10.
Начиная с Windows 10 1607 вы можете указывать параметры установки через файл Setupconfig.ini. Этот файл должен находится в каталоге с setup.exe и содержать примерно такой текст, аналогичный команде выше:
Для запуска обновления Windows 10 с помощью файла параметров используется команда: