0

I'm trying to fix a friend's Windows 7 PC. I originally asked a question at

How to restore a Windows Vista PC to factory settings, when it has been upgraded to Windows 7

And got a useful answer from @Patrick R., which helped direct me towards the Windows 7 USB/DVD Download Tool. The friend who's PC I'm fixing couldn't remember his login for the Microsoft Store (where he thinks he bough his Windows 7 upgrade; he's relatively certain he bought it online, rather than buying a disk) so we borrowed a Windows 7 disk from another friend. But then my friend couldn't remember his Windows 7 product key, and because his PC isn't letting us run any programs we can't run something to tell us what the key is (I've read that we could physically remove the hard drive from the PC and then find the product key from another computer, but I'm trying to avoid that if possible).

Fortunately, thought, I found this:

http://www.intowindows.com/how-to-legally-reinstall-windows-7-without-product-key/

In short, it seems that you can tell Windows 7 to restore to factory settings from within control panel as long as you have a Windows 7 disk (which we now do), and that you won't need the product key (which is good, because we don't have that).

However, when I go through the steps listed in that link, I get the following error message:

"The unattend answer file contains an invalid product key. Either remove the invalid key or provide a valid product key in the unattend answer file to proceed with Windows installation."

Googling around that led me to this:

http://www.sevenforums.com/software/346150-unattend-answer-file-contains-invalid-product-key.html

That seems to suggest that it's possible to work around this error message by editing the unattend.xml file. But -- and here, finally, is my question -- where is the unattend.xml file?

6
  • Sounds like the license key currently being used isn't actually legitimate. You are 100% certain you used an ISO for the same version that is installed. It has to be exactly the same for what your doing to work.
    – Ramhound
    Commented Jan 15, 2015 at 0:29
  • As far as I've been told, everything is legitimate: and yes, the CD is Win 7 Home Pro SP1, the same as what's installed on the PC. I'm now considering using a bootable Linux USB drive to get hold of the Registry, and extracting the product key from there on another PC before just reinstalling Win7 from scratch. What do you think?
    – Jim
    Commented Jan 15, 2015 at 0:31
  • 1
    I believe your friend is holding important information out on you.
    – Ramhound
    Commented Jan 15, 2015 at 0:32
  • Could be, but I doubt it.
    – Jim
    Commented Jan 15, 2015 at 0:32
  • There is also no such Windows 7 version as "Home Pro"... it's either "Home Premium" or "Professional" (there are also others but "Home Pro" isn't one). I can also see that your friend has upgraded Vista to 7 (according to your first link as a hint)... either way this is not going to end very well because the original product key is for Vista and key for 7 is an upgrade so you must first have an eligible OS installed for an in-place upgrade to succeed.
    – Kinnectus
    Commented Jan 15, 2015 at 12:42

3 Answers 3

1

From what you're saying, your friend doesn't even have a Windows 7 key, but an upgrade key. This really changes things a bit. One thing is really necessary to make sure he is not holding information from you - I really don't want to accuse anybody, but Windows being uncertain about it's own product key isn't really a normal situation without using 3rd party tools:

Your friend gets himself sorted and gets the upgrade key from the windows store. They provide a lot of password recovery options, so he should really be able to do that. If not, contact customer support. If he somehow still says that he can't get the key back, simply tell him to buy a new license - maybe even Windows 8 for that matter.

You then have two options:

  • You keep trying to find a way to directly install windows7 and let it accept that upgrade key of yours. You will have to keep fiddling around and are more than likely to have more issues.
  • You use that Vista Recovery DVD your friend still has, get the laptop back to a functional Vista installation and proceed to upgrade with the key you obtained.

To be honest, looking at how much time you already invested in this, he should just have bought a new systembuilder key.

4
  • I thought that might be the case, Patrick, but I extracted the product key anyway (by booting into a Linux installation on a USB drive, copying over the contents of C:\Windows\System32\config, and then examining these files on another Win 7 installation) and then booted the laptop from the Win7 install DVD, and started a fresh installation process. Everything worked fine! The product key was accepted, Windows was authenticated online, updates are working!
    – Jim
    Commented Jan 15, 2015 at 14:31
  • I see what you mean regarding getting an upgrade key from the Windows Store, but my friend couldn't remember what email address he'd used to login, or even if it really was the Windows Store; just that he'd bought the upgrade "online". I find this quite a lot; people just lose their product keys, or don't make copies of system disks, etc. I've got no reason to mistrust him, not because he's my friend but simply because he knows there's no reason to not be truthful in this instance. Thanks for your help (in both answers!!)
    – Jim
    Commented Jan 15, 2015 at 14:34
  • You're really welcome, and I really didn't want to accuse you guys of doing it in an illegitimate way. Glad you worked it out.
    – Patrick R.
    Commented Jan 15, 2015 at 14:35
  • No problem! You have to examine every possible cause for things like this, and it's difficult to tell from a distance whether someone is being honest or not. I think this is more a case of the systemic fault with online software purchases and product keys; people often lose the keys and links to online software downloads, because they don't seem important until you need them. Similarly, a lot of people don't create the system restore disks that their new laptop nags them about. Anyway, all fixed now; thanks again for your help :)
    – Jim
    Commented Jan 15, 2015 at 14:59
0

As per my comments above, I couldn't locate the unattend.xml file. The other option would of course be to install Windows from scratch, but without the product key this isn't possible. Also, the computer I was trying to fix was able to boot into Windows, but it wasn't able to run any programs: so I wasn't able to use a product key extraction program.

So in the end I:

  1. Used SystemRescueCD (http://www.sysresccd.org/SystemRescueCd_Homepage) to boot up the PC, and access the contents of the harddrive
  2. Mounted an external harddrive, and copied the contents of C:\Windows\System32\config (i.e., the registry) to that harddrive
  3. Connected that harddrive to a working Windows 7 installation
  4. Used Enchanted Keyfinder (http://ekeyfinder.sourceforge.net/) to examine the registry backup for product keys, using the "Load Hive" option to load the registry backup from the external harddrive
  5. Booted the ailing PC from the Win7 installation DVD, ran the installer, and entered the product key I found in step 4 when requested

I was quite surprised that this worked, mainly because I was expecting complications to be caused by the original Win7 installation being an upgrade from Vista: but I can confirm that it worked, at least in this case. I'm wondering if the unattend.xml file (or what the pretty broken laptop was recognising as the unattend.xml file) was left over on the laptop from a Win7 installation that had been abandoned; I've read in various places online that this can be the case.

0

You are getting this message because every unattend file has a false product key within it by default to show you how to put in the actual one.

If you are getting this message, then your friend did not correctly set up the file to allow unattended setup of his system.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .