( TL;DR – Jump down to “The Problems” if you are ever thinking of running ChangePk.exe to change Windows 10 Versions)
One of the cool new features of Windows 10 is the ability to perform an “Edition Upgrade”. The ability to convert an existing Windows 10 instance from one version to another.
The collection of Windows 10 versions available for download is crazy:
(Not including the Phone, Server, IoT, and VHD versions)
- Windows 10 with Bing
- Windows 10 Home
- Windows 10 Home for OEM’s
- Windows 10 Pro
- Windows 10 Pro for OEm’s
- Windows 10 Enterprise
- Windows 10 Enterprise – LTSB
- Windows 10 Enterprise Eval
- Windows 10 Enterprise Eval – LTSB
- Windows 10 Education
- Windows 10 Pro Checked
Multiply the SKU’s above to include both x86 and x64
Multiply the SKU’s above with the “N” version to comply with some import laws.
Multiply all the SKU’s above with different versions for each Language Type.
<whew> Keeping track of all these types a chore (please let me know if I missed any :^)
Say you purchase 150 new computers of different types (some Desktop, some Laptop, and some Tablets). You have a Enterprise Volume Licensing agreement with Microsoft, so you want all of these machines to run Enterprise VL. How do you get Enterprise on these machines.
The old Windows way was to create news images for the OS Verison you wanted, collect the drivers for the hardware types you had, and to create images or better yet create a MDT or SCCM deployment solution, It could take a day for development and another day or two to test for each hardware type.
Now with the new Edition Upgrade feature built in to Windows we now have a shortcut for this process. If we purchased our machines with Windows 10 Pro, then we just need to perform a single step to upgrade the version type from Pro to Enterprise. This has a huge advantage since we can leverage the drivers already installed on the machine by each OEM.
There are a couple of deployment options available for you to perform the upgrade.
- Manual – Start up Windows 10 “Settings” –> “Update & Security” –> “Activation” tab –> “Change product key”
This will run “ChangePk.exe” to perform the actual updating the machine.
- MDM – If you have an MDM, you can “push” out the Version change to the machine from the MDM host.
- ICD – You can create a Windows Imaging and Configuration Designer ” (ICD) package with the appropriate new product Key, and apply it to Windows 10.
- Script – You can also call the ChangePk.exe command directly and pass in the new product key on the command line.
All we need to do is to figure out how to run the command to perform the actual upgrade. I have been monitoring some email threads and web articles describing the feature, and decided to get down “into the weeds” and try myself.
I setup one of my Surface Pro 3 machines with the latest Windows 10 Pro recovery image. Ready to upgrade.
Going through the options available above, let’s pick an option to deploy.
- Manual – We have 150 machines that we need to upgrade, and I would prefer not to perform these steps manually, instead I would prefer to do some quick and dirty scripting. :^)
- MDM – I don’t have an MDM (Mobile Device Management) suite yet. (Sorry Intune)
- ICD – ICD looks like a good option on paper, but after digging into the details, you can only apply the ICD package against an “offline” image, meaning you can apply it to a mounted WIM, or you will need to Boot into WinPE just to run this command, which is not optimal (I would prefer just to boot into Audit Mode, perform an edition update, and reseal):
DISM.exe /Image=C:\ /Add-ProvisioningPackage /PackagePath:C:\oem.ppkg
- Script – Finally there is the option to run ChangePk.exe from the command line and pass in the new Product Key. For example to change pro to Enterprise:
(in case you’re wondering, that is the Windows 10 Enterprsie GVLK key – publicly available/documented – that says “active via KMS”. it will change a Windows 10 Pro install to Windows 10 Enterprise and cause it seek out a KMS server after it is rebooted). Thanks to Mike Niehaus for pointing in the right direction.
First off, the ChangePk.exe command above didn’t work on my Surface Pro 3 device. I tried the usual discovery methods like calling “ChangePk.exe /?”, but returned nothing. I also tried searching the web, but Microsoft has no documentation on it ( as of 8/25/15, nearly a month after General Availability of Windows 10).
The ever Amazing Johan Arwidmark revealed that there is no “:” after /ProductKey. Cool, and he also revealed that there are also flags to suppress Reboots and to suppress UI.
Changepk.exe /ProductKey NPPR9-FWDCX-D2C8J-H872K-2YT43
However, that’s when things got really weird, when we were informed by someone in authority on the matter that the flags to suppress Reboots and UI not supported, not documented, subject to change, and we were asked not to use these flags… Oh.
Then I found out that once you initiate ChangePk.exe to perform a version upgrade, there is no stopping it, in fact when ready, it will *immediately* force a reboot of the local machine. How Immediate is the reboot? Well, lets hope you don’t have any work open on the local box, because you won’t be given a chance to save your work on any open files. Gone!
Automation and Scripting
We then had a … Lively … discussion on the support of OS components for automation and scripting.
First of all, let’s scope out the audience here. Windows 10 Pro to Enterprise Version Transformation should be a very popular option for some out there. And many IT departments will probably ask themselves about automation options when pressed with the 150 computer deployment scenario I imagined above.
It would be nice if the ChangePk.exe could suppress the UI, but OK, whatever, I guess it will have a UI.
But forced reboots are a problem, that means that it’s a horrible idea to run this command remotely, if a user was logged on, but away from their desk, they could come back to find all of their work gone. And help desk get’s an angry call.
I have been involved with companies that have had to terminate IT Administrators who sent out forced “reboots” to corporate wide company desktops for the wrong reasons. Whoops.
Further discussion reveals that fixing this behavior in the immediate term is not going to happen.
So if you are an IT administrator who needs to perform Windows Version Upgrade remotely, be aware; ensure that you politely allow the user to shutdown gracefully first before running the ChangePk.exe command.
Call to action
It would be better if Microsoft supported automation and scripting to help IT administrators (documentation would also be nice.) The server business has their act together with “Powershell” working as a central common scripting and administration core. Products like Nano Server are forcing Windows teams to ensure that each feature has remote and scripting paths available for IT Management.
As I describe in my earlier post on automating Application Installation: Applications/tools should follow a couple of basic rules to make automation/scripting in tools like SCCM and MDT easier:
- Rule 1: Provide unattended installs
- Rule 2: Do not display blocking UI
- Rule 3: Do not exit until done
- Rule 4: No rebooting
ChangePk.exe violates Rule #4 in a big way :^(
My name is Keith Garner, and I love to make separate Microsoft technologies “appear” as if were designed as a whole. ;^) Support your local Scripter.