Easy Sysprep Answer File Retains Activation

Create a simple answer file for the Windows System Preparation (Sysprep) tool.

Create Sysprep Answer File

By Steven Jordan on April 4th, 2012.

Why use an answer file?  The answer key includes the Windows product key and retains its activation throughout the cloning process. Newly provisioned systems have an out of box (OOB) experience which boots straight to the Windows Start Screen.

How do I use Sysprep with an answer file?

  1. Setup & configure a fresh version of Windows per individual preference.  Install all applications and updates.
  2. Enter the Windows product key and activate the product.
  3. Use the XML code (below) as the Sysprep answer file.  
  4. Edit the code to include the correct key.
  5. Save the XML to c:\Windows\System32\Sysprep\autounattend.xml
  6. Run Sysprep with the following switches:  
          C:\Windows\System32\Sysprep\sysprep /generalize /oobe /shutdown /unattend:Autounattend.xml

That's it.  Before you attach the VHD to a new VM, or starup the newly sysprepped VM, make a copy of the original (i.e., golden image) so it can be used again.  The VM starts up with the product key already activated.

N.B.  2012 systems ask for a key when it boots up for the first time.  Don't worry about the key; simply click next.  Confirm the system is activated in System from the Control Panel.  This does not appear to be an issue with 2012 R2.

# Save the code below as Autounattend.xml.
# Change the <Product key> to match correct key.
# Save in c:\Windows\Ststem32\Sysprep

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="oobeSystem">
    <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <TimeZone>Pacific Standard Time</TimeZone>
<settings pass="specialize">
    <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">




Post a Comment

My Instagram