- Обновление билда Windows 10 из командной строки
- Параметры установщика Setup.exe в Windows 10
- Генерация актуального ISO образа Windows 10
- Проверка совместимости (возможности апгрейда) Windows 10
- Автоматизация обновления версии Windows 10 из командной строки
- Upgrade Windows 10 Home to Windows 10 Pro
- Windows 10 edition upgrade
- Upgrade using mobile device management (MDM)
- Upgrade using a provisioning package
- Upgrade using a command-line tool
- Upgrade by manually entering a product key
- Upgrade by purchasing a license from the Microsoft Store
- License expiration
- Scenario example
- Supported Windows 10 downgrade paths
Обновление билда 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 с помощью файла параметров используется команда:
Upgrade Windows 10 Home to Windows 10 Pro
Before upgrading to Windows 10 Pro, make sure your device is up to date and running the most recent version of Windows 10 Home. For more info about how to keep your PC updated, see Windows Update: FAQ.
To upgrade from Windows 10 Home to Windows 10 Pro and activate your device, you’ll need a valid product key or a digital license for Windows 10 Pro.
Note: If you don’t have a product key or a digital license, you can buy Windows 10 Pro from Microsoft Store. Select the Start button, select Settings > Update & Security > Activation , and then select Go to Microsoft Store. From here, you can also see how much this upgrade will cost.
Open Activation settings
Use the following chart to determine which activation method you’ll use:
If you got Windows 10 by.
Upgrading to Windows 10 for free from an eligible device running a genuine copy of Windows 7 or Windows 8.1.
Buying a Windows 10 Pro upgrade from the Microsoft Store app and successfully activated Windows 10.
Being a Windows Insider and upgrading to the newest Windows 10 Insider Preview build on an eligible device that was running an activated earlier version of Windows and Windows 10 Preview.
Buying genuine Windows 10 from the Microsoft Store app.
Buying a copy of Windows 10 from an authorized retailer.
Find it on a label inside the Windows 10 box. A digital license will be given to your device for Windows 10 based on the valid product key you entered.
If you bought your PC from a manufacturer, the manufacturer, not Microsoft, must provide a product key.
Buying a digital copy of Windows 10 from an authorized retailer.
Find it in the confirmation email you received after buying Windows 10 or in a digital locker accessible through the retailer’s website.
A digital license will be given to your device for Windows 10 based on the valid product key you entered.
Having a Volume Licensing agreement for Windows 10 or MSDN subscription.
It is available through the web portal for your program.
Buying a new or refurbished device running Windows 10.
It is preinstalled on your device, included with the device packaging, or included as a card or on the Certificate of Authenticity (COA) attached to the device.
If you bought a refurbished PC, the refurbisher, not Microsoft, must provide you a product key.
Find it in the confirmation email that contains the order history.
If you’re ready to upgrade, select one of the following headings to get started:
To upgrade, select the Start button, then select Settings > Update & Security > Activation .
Open Activation settings
If you have a digital license for Windows 10 Pro, and Windows 10 Home is currently activated on your device, you’ll see one of two messages when you select Go to Microsoft Store:
If you see Install, select the button to install Windows 10 Pro.
If you see Buy, you may need to purchase a Windows 10 Pro license. Or, try to sign in to Microsoft Store with the Microsoft account that was used to purchase the Pro license. Then, follow the instructions to install Windows 10.
If you have a digital license for Windows 10 Pro, but Windows 10 Home isn’t activated on your device, select Troubleshoot and then follow the instructions to upgrade to Windows 10 Pro.
Select the Start button, then select Settings > Update & Security > Activation .
Select Change product key, and then enter the 25-character Windows 10 Pro product key.
Select Next to start the upgrade to Windows 10 Pro.
Having issues with activation after your upgrade?
See the following for more help activating your valid product key or digital license for Windows 10 Pro:
Windows 10 edition upgrade
Applies to
- WindowsВ 10
- WindowsВ 10 Mobile
With WindowsВ 10, you can quickly upgrade from one edition of WindowsВ 10 to another, provided the upgrade path is supported. For information on what edition of WindowsВ 10 is right for you, see Compare Windows 10 Editions. For a comprehensive list of all possible upgrade paths to Windows 10, see Windows 10 upgrade paths. Downgrading the edition of Windows is discussed in the License expiration section on this page.
For a list of operating systems that qualify for the Windows 10 Pro Upgrade or Windows 10 Enterprise Upgrade through Microsoft Volume Licensing, see Windows 10 Qualifying Operating Systems.
The following table shows the methods and paths available to change the edition of WindowsВ 10 that is running on your computer. Note: The reboot requirement for upgrading from Pro to Enterprise was removed in version 1607.
Note: Although it isn’t displayed yet in the table, edition upgrade is also possible using edition upgrade policy in Microsoft Endpoint Configuration Manager.
(X) = not supported
(green checkmark) = supported, reboot required
(blue checkmark) = supported, no reboot required
Pro |Home > Education |Pro > Education |Pro > Enterprise |Ent > Education |Mobile > Mobile Enterprise | |——-|————|——————|—————-|——————|—————-|———| | Using mobile device management (MDM) | | | | | | | | Using a provisioning package | | | | | | | | Using a command-line tool | | | | | | | | Entering a product key manually | | | | | | | | Purchasing a license from the Microsoft Store | | | | | | | —>
Edition upgrade | Using mobile device management (MDM) | Using a provisioning package | Using a command-line tool | Using Microsoft Store for Business or PC | Entering a product key manually | Purchasing a license from the Microsoft Store |
---|---|---|---|---|---|---|
Home > Pro | ||||||
Home > Pro for Workstations | ||||||
Home > Pro Education | ||||||
Home > Education | ||||||
Pro > Pro for Workstations | (MSfB) | |||||
Pro > Pro Education | (MSfB) | |||||
Pro > Education | (MSfB) | |||||
Pro > Enterprise | (1703 — PC) (1709 — MSfB) | |||||
Pro for Workstations > Pro Education | (MSfB) | |||||
Pro for Workstations > Education | (MSfB) | |||||
Pro for Workstations > Enterprise | (1703 — PC) (1709 — MSfB) | |||||
Pro Education > Education | (MSfB) | |||||
Enterprise > Education | (MSfB) | |||||
Mobile > Mobile Enterprise |
- For information about upgrade paths in Windows 10 in S mode (for Pro or Education), check out Windows 10 Pro/Enterprise in S mode
- Each desktop edition in the table also has an N and KN SKU. These editions have had media-related functionality removed. Devices with N or KN SKUs installed can be upgraded to corresponding N or KN SKUs using the same methods.
- Due to naming changes the term LTSB might still be displayed in some products. This name will change to LTSC with subsequent feature updates.
Upgrade using mobile device management (MDM)
To upgrade desktop editions of WindowsВ 10 using MDM, you’ll need to enter the product key for the upgraded edition in the UpgradeEditionWithProductKey policy setting of the WindowsLicensing CSP. For more info, see WindowsLicensing CSP.
To upgrade mobile editions of WindowsВ 10 using MDM, you’ll need to enter the product key for the upgraded edition in the UpgradeEditionWithLicense policy setting of the WindowsLicensing CSP. For more info, see WindowsLicensing CSP.
Upgrade using a provisioning package
Use Windows Configuration Designer to create a provisioning package to upgrade a desktop edition or mobile edition of Windows 10. To get started, install Windows Configuration Designer from the Microsoft Store.
To create a provisioning package for upgrading desktop editions of WindowsВ 10, go to Runtime settings > EditionUpgrade > UpgradeEditionWithProductKey in the Available customizations panel in Windows ICD and enter the product key for the upgraded edition.
To create a provisioning package for upgrading mobile editions of WindowsВ 10, go to Runtime settings > EditionUpgrade > UpgradeEditionWithLicense in the Available customizations panel in Windows ICD and enter the product key for the upgraded edition.
For more info about Windows Configuration Designer, see these topics:
Upgrade using a command-line tool
You can run the changepk.exe command-line tool to upgrade devices to a supported edition of WindowsВ 10:
You can also upgrade using slmgr.vbs and a KMS client setup key. For example, the following command will upgrade to Windows 10 Enterprise.
Cscript.exe c:\windows\system32\slmgr.vbs /ipk NPPR9-FWDCX-D2C8J-H872K-2YT43
Upgrade by manually entering a product key
If you are upgrading only a few devices, you may want to enter a product key for the upgraded edition manually.
To manually enter a product key
From either the Start menu or the Start screen, type ‘Activation’ and click on the Activation shortcut.
Click Change product key.
Enter your product key.
Follow the on-screen instructions.
Upgrade by purchasing a license from the Microsoft Store
If you do not have a product key, you can upgrade your edition of WindowsВ 10 through the Microsoft Store.
To upgrade through the Microsoft Store
From either the Start menu or the Start screen, type ‘Activation’ and click on the Activation shortcut.
Click Go to Store.
Follow the on-screen instructions.
Note
If you are a WindowsВ 10 Home N or WindowsВ 10 Home KN user and have trouble finding your applicable upgrade in the Microsoft Store, click here.
License expiration
Volume license customers whose license has expired will need to change the edition of Windows 10 to an edition with an active license. Switching to a downgraded edition of Windows 10 is possible using the same methods that were used to perform an edition upgrade. If the downgrade path is supported, then your apps and settings can be migrated from the current edition. If a path is not supported, then a clean install is required.
Downgrading from any edition of Windows 10 to Windows 7, 8, or 8.1 by entering a different product key is not supported. You also cannot downgrade from a later version to an earlier version of the same edition (Ex: Windows 10 Pro 1709 to 1703) unless the rollback process is used. This topic does not discuss version downgrades.
Note: If you are using Windows 10 Enterprise Subscription Activation and a license expires, devices will automatically revert to the original edition when the grace period expires.
Scenario example
Downgrading from Enterprise
- Original edition: Professional OEM
- Upgrade edition: Enterprise
- Valid downgrade paths: Pro, Pro for Workstations, Pro Education, Education
You can move directly from Enterprise to any valid destination edition. In this example, downgrading to Pro for Workstations, Pro Education, or Education requires an additional activation key to supersede the firmware-embedded Pro key. In all cases, you must comply with Microsoft License Terms. If you are a volume license customer, refer to the Microsoft Volume Licensing Reference Guide.
Supported Windows 10 downgrade paths
вњ” = Supported downgrade path
В SВ = Supported; Not considered a downgrade or an upgrade
[blank] = Not supported or not a downgrade
Destination edition | |||||||||
Home | Pro | Pro for Workstations | Pro Education | Education | Enterprise LTSC | Enterprise | |||
Starting edition | |||||||||
Home | |||||||||
Pro | |||||||||
Pro for Workstations | |||||||||
Pro Education | |||||||||
Education | вњ” | вњ” | вњ” | S | |||||
Enterprise LTSC | |||||||||
Enterprise | вњ” | вњ” | вњ” | S |
Windows 10 LTSC/LTSB: Due to naming changes, product versions that display Windows 10 LTSB will be replaced with Windows 10 LTSC in subsequent feature updates. The term LTSC is used here to refer to all long term servicing versions.
Windows N/KN: Windows «N» and «KN» SKUs follow the same rules shown above.
Some slightly more complex scenarios are not represented by the table above. For example, you can perform an upgrade from Pro to Pro for Workstation on a computer with an embedded Pro key using a Pro for Workstation license key, and then later downgrade this computer back to Pro with the firmware-embedded key. The downgrade is allowed but only because the pre-installed OS is Pro.