When performing a scripted installation or upgrading Windows 10 using setup.exe, it’s essential to specify the correct Windows version. This can be done by providing the appropriate product key, either in an unattend.xml file for scripted installations or directly as an argument in the setup.exe command for upgrades.
Prerequisites
Before you start, ensure you have:
- The correct product key (MAK or KMS client key).
- Administrative privileges to run setup.exe or modify XML files.
Method 1: Specifying the Product Key in Unattend.XML
For scripted installations, you can specify the product key in the unattend.xml file.
- Create or Edit the Unattend.XML File:
- Open your unattend.xml file or create a new one using Windows System Image Manager (WSIM).
- Add the Product Key:
- Insert the product key under the
Microsoft-Windows-Setup
component in theWindowsPE
pass.
- Insert the product key under the
xmlCopier le code<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
<UserData>
<ProductKey>
<Key>W269N-WFGWX-YVC9B-4J6C9-T83GX</Key>
</ProductKey>
</UserData>
</component>
- Save the XML File:
- Save the unattend.xml file and place it in the appropriate directory for your deployment method (e.g., in the
\Sources
folder of your installation media).
- Save the unattend.xml file and place it in the appropriate directory for your deployment method (e.g., in the
Method 2: Specifying the Product Key with Setup.exe
For upgrading Windows 10, you can specify the product key directly in the setup.exe command.
- Open Command Prompt:
- Open Command Prompt with administrative rights.
- Run Setup.exe with the Product Key:
- Use the following command to start the upgrade and specify the product key:
cmdCopier le codesetup.exe /quiet /auto Upgrade /pkey W269N-WFGWX-YVC9B-4J6C9-T83GX
This command runs setup.exe in quiet mode, automatically performs the upgrade, and uses the specified product key.
Finding the Right Product Key
- MAK Key: Use your Multiple Activation Key if you have one.
- KMS Client Key: If you have a KMS server, use the client key from the Microsoft documentation.
Example
To upgrade Windows 10 using setup.exe with a product key:
setup.exe /quiet /auto Upgrade /pkey W269N-WFGWX-YVC9B-4J6C9-T83GX
0 Comments