次の方法で共有


ProductKey

ProductKey specifies the key used to activate Windows.

Important

Entering an invalid product key in the answer file will cause Windows Setup to fail.

There are two Product Key settings you can configure.

  • Use the ProductKey setting in the Microsoft-Windows-Setup component to specify the Windows image to install during Windows Setup. This Product Key specified by this setting is stored on the computer after installation. If you choose to activate Windows, this Product Key will be used.
  • Use this ProductKey setting to specify a different Product Key to activate Windows. For example, you can specify one Product Key to install Windows with ProductKey (Microsoft-Windows-Setup), and then specify a different Product Key to use to activate Windows.

If you specify a product key in the windowsPE configuration pass with ProductKey (Microsoft-Windows-Setup), then Windows welcome will prompt for a product key. If you specify the ProductKey (Microsoft-Windows-Shell-Setup) setting during the specialize pass, then Windows Welcome will not prompt for a product key.

Note

Sysprep does not reset the grace period for MSDN or lab installations.

Values

Product_key

Specifies the key used to install and to activate Windows. Product_key is a 29-character string.

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

Valid Passes

specialize

Parent Hierarchy

Microsoft-Windows-Shell-Setup | ProductKey

Applies To

For the list of the supported Windows editions and architectures that this component supports, see Microsoft-Windows-Shell-Setup.

XML Example

The following XML output shows how to set the Product Key.

<ProductKey>AAAAA-BBBBB-CCCCC-DDDDD-EEEEE</ProductKey>

See Also

Concepts

Microsoft-Windows-Shell-Setup