Key (microsoft-windows-setup-userdata-productkey-key)

Key specifies the 25-character product key that determines which edition of Windows to install. Use the correct product key for the edition of Windows that you are installing. For more information about using product keys in answer files, see the Work with Product Keys and Activation topic in the Windows Assessment and Deployment Kit (Windows ADK) Technical Reference.

The product key that you use to activate the installation must match the number on the Certificate of Authenticity (COA) sticker that accompanies the retail product or that is physically attached to the computer case by the original equipment manufacturer (OEM).

Standard licensing agreements specify that you can use a product key only to activate one installation of Windows on one computer. Windows Product Activation enforces this requirement.

Comparison of Product Key Settings

microsoft-windows-setup-\UserData\ProductKey<code>Key

Specifies the Windows image to install during Windows Setup.

Microsoft-Windows-Shell-SetupProductKey

Specifies a product key to activate Windows. This setting can be used with microsoft-windows-setup-\UserData\ProductKey\Key, and the two product keys can be different.

If you are using a Volume-License Multiple-Activation Key (MAK), it must be specified using this setting.

Values

product_key

Specifies the product key to apply to an installation of Windows.

Product keys are 25 characters in the following format:

xxxxx-xxxxx-xxxxx-xxxxx-xxxxx

This string type does not support empty elements. Do not create an empty value for this setting.

Valid Configuration Passes

windowsPE

Parent Hierarchy

microsoft-windows-setup- | UserData | ProductKey | Key

Applies To

For a list of the Windows editions and architectures that this component supports, see microsoft-windows-setup-.

XML Example

The following XML output shows how to set user data.

<UserData>
   <AcceptEula>true</AcceptEula>
   <FullName>EndUserName</FullName>
   <Organization>Fabrikam</Organization>
   <ProductKey>
      <Key>12345-12345-12345-12345-12345</Key>
      <WillShowUI>Never</WillShowUI>
   </ProductKey>
</UserData>

ProductKey