Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: The Unattend answer file contains an invalid product key

19 Sep 2014   #1

Windows 7 Pro x64 - Windows 8.1 Pro x64
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="" xmlns:xsi="">
<settings pass="specialize">
<component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="" xmlns:xsi="">
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="" xmlns:xsi="">
<RunSynchronousCommand wcm:action="add">
<Path>Net Accounts /maxpwage:unlimited</Path>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="" xmlns:xsi="">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="" xmlns:xsi="">
<SynchronousCommand wcm:action="add">
<CommandLine>CSCRIPT //NOLOGO slmgr.vbs -rearm &gt; NUL 2&gt;&amp;1</CommandLine>
<SynchronousCommand wcm:action="add">
<cpifflineImage cpi:source="catalog:g:/latest_wim&amp;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.

My System SpecsSystem Spec
21 Sep 2014   #2

x64 (6.3.9600) Win8.1 Pro & soon dual boot x64 (6.1.7601) Win7_SP1 HomePrem

For future reference: Windows 7 | Deploy, Download, Forums, Help, Events, XP | TechNet

The only interesting thing I found was a reference to disabling the floppy drive.
The unattend answer file contains an invalid product key
Quote   Quote: Originally Posted by Sunyata Group
Once you have verified that the product key is valid ("genuine product" | "full product" | "upgrade product") for the type of installation that you are doing . . . Then try this:

Start the installation/set-up process again, and wait for the error message to appear.

Locate the "Settings" menu in the installation menu bar.

Under the "Settings" window -> Select "Removable Devices" --> Double-click the "Floppy" icon => Turn off "Enable Floppy Drive".

Now hit the "OK" button in the error message box. If that does not work straight away, Restart the installation process.

This should work on a number of products.

Good luck!

Edited by Sunyata Group Saturday, December 29, 2012 4:40 PM
That might be one of the silly things you're looking for. Other than that I won't be much help - you seem to have a firm grasp on the process, more so than I have.

There are some members who know this stuff fairly well - hang in for their input.

Good luck,

My System SpecsSystem Spec
21 Sep 2014   #3


The answer file seems OK, read it through several times and cannot find any errors, only one small detail which I would change: You have the user Welcome Center enabled (<SkipUserOOBE>false</SkipUserOOBE>), I personally find it annoying and would disable it (<SkipUserOOBE>true</SkipUserOOBE>). But, this is a matter of taste and habits, no arguing .

That floppy trick Slartybart above told seems to be all over the net, I would recommend testing it. Also, to be absolutely sure the key is not somehow "hidden", open your answer file with Windows System Image Manager and check the both places where it might be found, WindowsPe > Microsoft-Windows-Setup and Specialize > Microsoft-Windows-Shell-Setup.

An important thing to do is validation; check the answer file with SIM validator and read warnings carefully.

My System SpecsSystem Spec

22 Sep 2014   #4

Windows 7 Pro x64 - Windows 8.1 Pro x64

Tks for the replies so far.
I did check on that Floppy issue, it really is all over the web, but it's always been disabled (by default).

"You have the user Welcome Center enabled (<SkipUserOOBE>false</SkipUserOOBE>), I personally find it annoying and would disable it (<SkipUserOOBE>true</SkipUserOOBE>)"
The only reason for having it enabled is because, along with SkipMachineOOBE=true it WILL prompt me to create a new account, which i don't want to, instead of going straight to the login screen . Sysprep weirdness, i guess. Oh, wait, sysprep weirdness, what's that

I guess that i could just forget all about it and start fresh, which would be very painfully time consuming, as it is painful to just ignore this, not understand why it's causing it and how to prevent it
My System SpecsSystem Spec
29 Sep 2014   #5

Windows 7 Pro x64 - Windows 8.1 Pro x64

Found the issue.
Booted up with F8+repair and opened up a command prompt. In the rot of X:\ there's an unattend.xml file. With a key in it, which is bbbbb-bbbbb-bbbbb...
Editing the XML and removing the key lets the recovery run no problem. Now, isn't that silly
The next issue is where the damn unattend.xml's coming from. I opened both WinRe.wim (windows and recovery partition) and there were no signs of any unattend.xml. Saved both WIM with a clean unattend.xml, copy of that with no shenanigans key (the WIM in the recovery partition is registered) so i'd guess it's being generated, but not retrieving the key properly? Though the bbbbb key will still be there even if i SLMGR they key out of Windows. That silly unattend.XML always seems to take precedence.
Maybe the WinRe.wim is messed up, i'll try to replace it and see what happens.
One way or the other, it's better then nothing.
My System SpecsSystem Spec
22 Oct 2014   #6

Windows 7 Pro x64 - Windows 8.1 Pro x64

For closure on this thread, i'll relate to another post

Solved How do I find my Product Key? - Page 4

I am using a MAK key, with regular activation. Wonder if activating through a KMS server would make any difference (?), but in this context it serves no purpose. And indeed, there is no key stored in the registry, just 00s. Reason why the key being retrieved is a bunch of BBBBB. Why Setup generates the Unattend.xml with such heresy, which will cause 100% fail, is beyond my comprehension.

By simply running slmgr/upk and slmgr/ipk to inject a valid OEM key (and skipping activation, of course), running the recovery from within Windows 7 works properly. Problem solved.
As for running the recovery from F8-Repair your computer, my solution was to make a copy of the generated Unattend.xml file on the root of X:\ and remove the key entry; then mount the WinRE.wim image, copy the modified Unattend.xml file to the mounted image, along with a script that will replace the generated xml with this modified (to simplify things), save changes and dismount.
To run the recovery, F8-command line, run the script from the command line, then run Reinstall Windows.
After Windows boots up for the first time, inject the MAK key and activate.
Problems solved.

Maybe there is another, less clumsy way to do all this? Nevertheless, it will be quite easy to script patch my computers with this method using only a batch with a few lines, and that was my objective.
My System SpecsSystem Spec
22 Oct 2014   #7


A strange issue, really clever workarounds .
My System SpecsSystem Spec
22 Oct 2014   #8

Windows 7 Pro x64 - Windows 8.1 Pro x64

Adding to my last post, it's not necessary to add a OEM key at all to run the recovery from windows. I tried it because i had one available and wanted to see if that reflected on the Unattend.xml file, which does. The key is there, instead of the BBBBB stuff.
Deleting the ProductId key is enough (not necessary deleting the ProductIdx64), the recovery will run from within Windows. This might solve the problem for OEM computer users that don't have Media available for a fresh install and need to restore from the OEM recovery partition, using the provided recovery tool, and run into the same "The Unattend answer file contains an invalid product key" wall.
Extracting the BIOS embedded Windows key from newer computers for further activation might be necessary (whaaa no Windows sticker???????), RW Portable from RWEverything | Read & Write Everything is a lifesaver.

I hope this helps someone someday, i read through so many forum threads related to the same, or very similar issue, and none have a concrete answer.
My System SpecsSystem Spec

 The Unattend answer file contains an invalid product key

Thread Tools

Similar help and support threads
Thread Forum
New product key to replace invalid product key
Just discovered that the Win 7 Professional Retail Version I purchased, downloaded & installed has a bogus product key. I've since ordered a genuine Win 7 copy. When it arrives, can I just enter the new product key into the existing system without reinstalling Win 7 again, following the "change...
Windows Updates & Activation
WDS Unattend.xml answer file help needed
I have been trying to transition over to using WDS for my main method of Windows 7 image deployment in our Server 2008 R2 domain environment. I am having trouble with getting the answer file to work properly. I have read through multiple threads, posts, and guides including the guide on this site ...
Installation & Setup
Windows cannot parse the unattend answer file's <DiskConfiguration>...
Hi there. I'm trying to do a clean install of Windows 7 Ultimate on a Sony Vaio AR41s via a DVD that I burned (slowest speed, was very careful about that) but upon starting the installation I get the error message: Windows cannot parse the unattend answer file's <DiskConfiguration> setting ...
Installation & Setup
please help. Product key invalid
Hello. so i did a Fresh install about 5 months ago and bare foot kid helped me alot. i just got a new 300gb raptor HD and i'm installing windows 7 from an upgrade version of windows 7 ultimate. i am following this guide for Clean install from upgrade version that i followed last time. i am...
Windows Updates & Activation
Windows could not apply the unattend answer file's
I am getting this error when I am install Windows 7: Windows could not format a partition on disk 0 - error code 0x80004005 during a new install of Windows 7. I have tried both Home Premium x64 and Enterprise x64. Both falling into the same error: I've removed all partition using gparted,...
Installation & Setup
Invalid product key
Hi all, well i have a problem here.. i just bought the Windows 7 Ultimate Upgrade 32-bits edition.. well everything went fine.. and when i was at the "Enter product key screen" the key that i am entering is INVALID???????????????? like wth.. i tried it for 30 minutes.. someone els...
Installation & Setup

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 20:22.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App