New
#1
The Unattend answer file contains an invalid product key
I am responsible for building, updating, converting, building a sysprepped Windows 7 Pro master and deploy it on my company's computers. The final result is a build that includes full recovery capability, as most of these computers are used outside the office, some in remote locations.
To achieve this, i have a "master" VHD that was built with a genuine iso dowloaded from the Microsoft VLSC, and is regularly updated with Windows and specific software updates. I copy this VHD somewhere else, and Sysprep/shutdown the copy. This copy is mounted and captured to WIM
using DISM, and added drivers for all the many different Lenovo computer models and machine types we have out there, both Desktops and Laptops.
Having a "Master" WIM, and for the sake of keeping the Unattend.xml file as simple as possible, i use my own script to deploy the WIM to a Hard Drive with this configuration: System reserved+WinRE-Recovery-Windows7. The Recovery partition being before the Windows partition is due to the fact that this will be deployed to hard drives of sizes ranging from 80GB to 1TB+. This deployment is then imaged with other Imaging software, for quick deployment (things can get pretty hectic and i need to shave off as much time as possible). Before sending the computers to the field, they are booted, updated with any missing drivers/model specific OEM software and other specific licensed Software, last minute updates, specific user configuration, and extend Windows partition to accommodate the whole drive.
Ive been using the same VHD Master and Unattend.xml file for months, everything was working fine until recently. I was doing a routine check on a deployed image, and for my surprise the Recovery failed with the dreaded error "The Unattend answer file contains an invalid product key". I use the same bulk MAK key, and haven't ran out.
The Unattend.xml:
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="generalize">
<component name="Microsoft-Windows-Security-SPP" 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">
<SkipRearm>1</SkipRearm>
</component>
</settings>
<settings pass="specialize">
<component name="Microsoft-Windows-Security-SPP-UX" 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">
<SkipAutoActivation>true</SkipAutoActivation>
</component>
<component name="Microsoft-Windows-Deployment" 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">
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Credentials>
<Username>USER</Username>
</Credentials>
<Order>1</Order>
<Path>Net Accounts /maxpwage:unlimited</Path>
</RunSynchronousCommand>
</RunSynchronous>
</component>
</settings>
<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">
<InputLocale>en-us</InputLocale>
<SystemLocale>en-us</SystemLocale>
<UILanguage>en-us</UILanguage>
<UILanguageFallback>en-us</UILanguageFallback>
<UserLocale>en-us</UserLocale>
</component>
<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">
<OOBE>
<HideEULAPage>true</HideEULAPage>
<NetworkLocation>Work</NetworkLocation>
<ProtectYourPC>1</ProtectYourPC>
<HideWirelessSetupInOOBE>false</HideWirelessSetupInOOBE>
<SkipMachineOOBE>true</SkipMachineOOBE>
<SkipUserOOBE>false</SkipUserOOBE>
</OOBE>
<RegisteredOrganization>COMPANY</RegisteredOrganization>
<ShowWindowsLive>false</ShowWindowsLive>
<RegisteredOwner>COMPANY</RegisteredOwner>
<DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet>
<DoNotCleanTaskBar>true</DoNotCleanTaskBar>
<FirstLogonCommands>
<SynchronousCommand wcm:action="add">
<CommandLine>CSCRIPT //NOLOGO slmgr.vbs -rearm > NUL 2>&1</CommandLine>
<RequiresUserInput>false</RequiresUserInput>
<Order>1</Order>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>/REBOOT</CommandLine>
<Order>2</Order>
<RequiresUserInput>false</RequiresUserInput>
</SynchronousCommand>
</FirstLogonCommands>
</component>
</settings>
<cpifflineImage cpi:source="catalog:g:/latest_wim&vhd/win7_wim/current/install_windows7.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
I am not, by any means, very knowledgeable of the intricacies of this xml build shenanigans, as i don't have much time to fiddle and experiment with it. The above was put together by trial, error, and adapted bits and pieces gather from the web.
I basically want it to skip everything OOBE and go straight to the user login, which is already set up as default for everyone. The Windows key was NEVER added to the XML.
------------------------------------------------------------------------------------------------------
As for now, i'm pretty much stuck.
I've already tried everything i could think of. Associating the XML with both the original WIM and the captured WIM, reactivating the master, etc... but there might be something silly i'm not aware of?
Any ideas for both a possible solution and improving the XML file are welcome.