locked
Product Key Prompt - Unattended Install - Key supplied unattend.xml answer file RRS feed

  • Question

  • I have create a Windows 7 Home Premium master image using a the official Microsoft Authorized refurbisher installation disc. I am trying to create the answer file that will contain the product key so that the end user will not have to manually enter it during the OOBE welcome.  Using the Windows System Image Manager I created a new answer file from scratch. I've tried three configurations of the answer file:

    1st attempt. Adding Microsoft-Windows-Setup\UserData\ProductKey  and entering the product key there and setting WillShowUI to 'never'

    2nd attempt. Adding Microsoft-Windows-Shell_Setup\ and entering the product key into the 'product key' field

    3rd attempt. I had both options 1 & 2 added in the same answer file

    Regardless, everything it boots to OOBE I am still prompted for the product key

    I've move the Sysrep folder to C:\sysrep and place the unattend.xml file into this folder.

    I'm am running sysrep with from the command prompt with this:

    C:\sysprep\sysprep /oobe /shutdown /unattend:C:\sysprep\unattend.xml

    Any idea as to why it is still prompting for the product key and or how I can get this to work?

    Thanks

    <?xml version="1.0" encoding="utf-8"?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
        <settings pass="specialize">
            <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <OEMInformation>
                    <Manufacturer>Test Company</Manufacturer>
                    <Model>Test Model</Model>
                    <SupportHours>Test Hours</SupportHours>
                    <SupportPhone>1-800-555-5555</SupportPhone>
                    <SupportURL>www.work.com</SupportURL>
                </OEMInformation>
                <ProductKey>12345-12345-12345-12345-12345</ProductKey>
            </component>
        </settings>
        <settings pass="windowsPE">
            <component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <UserData>
                    <ProductKey>
                        <Key>12345-12345-12345-12345-12345</Key>
                        <WillShowUI>Never</WillShowUI>
                    </ProductKey>
                </UserData>
            </component>
        </settings>
        <cpi:offlineImage cpi:source="wim:c:/documents%20and%20settings/owner/desktop/install.wim#Windows 7 HOMEPREMIUM" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
    </unattend>

    • Edited by AdamNYC31 Thursday, October 4, 2012 6:05 PM
    • Moved by Leo Huang Monday, October 8, 2012 5:45 AM (From:Windows 8 Installation, Setup, and Deployment)
    Thursday, October 4, 2012 4:32 PM

Answers

  • The Microsoft-Windows-Shell-Setup\ProductKey setting should be the one you need.

    http://technet.microsoft.com/en-us/library/ff715815(v=WS.10).aspx

    Does the product key match the installed edition of Windows? (HomePremium)

    Does it work if you add /generalize to the sysprep command? (C:\sysprep\sysprep /oobe /shutdown /generalize /unattend:C:\sysprep\unattend.xml)  This would force the specialize pass to run again and consume the new setting.

    • Proposed as answer by Vincent Wang-MCSC Thursday, October 18, 2012 8:54 AM
    • Marked as answer by Leo Huang Thursday, October 18, 2012 8:54 AM
    Friday, October 5, 2012 1:19 AM
  • Deleted
    • Proposed as answer by Vincent Wang-MCSC Thursday, October 18, 2012 8:54 AM
    • Marked as answer by Leo Huang Thursday, October 18, 2012 8:54 AM
    Thursday, October 11, 2012 4:44 PM

All replies

  • The Microsoft-Windows-Shell-Setup\ProductKey setting should be the one you need.

    http://technet.microsoft.com/en-us/library/ff715815(v=WS.10).aspx

    Does the product key match the installed edition of Windows? (HomePremium)

    Does it work if you add /generalize to the sysprep command? (C:\sysprep\sysprep /oobe /shutdown /generalize /unattend:C:\sysprep\unattend.xml)  This would force the specialize pass to run again and consume the new setting.

    • Proposed as answer by Vincent Wang-MCSC Thursday, October 18, 2012 8:54 AM
    • Marked as answer by Leo Huang Thursday, October 18, 2012 8:54 AM
    Friday, October 5, 2012 1:19 AM
  • Well , not in my case. I ran the command as 

    sysprep /generalize /oobe /unattend:"c:\autounattend.xml"

    (note : i saved my autounattend.xml file at c:)

    This works perfectly for me and automates almost everything i mentioned in my unattended file. I am somehow getting the country, keyboard prompt followed by product key. Rest everything is running automated. I am working on this and will share my xml once i find some luck ...

    Wednesday, February 1, 2017 4:15 PM
  • You can view the UnattendGC log to find out why it did not use the product key in the XML.

    Wednesday, February 1, 2017 9:45 PM