Welcome to Dagon Design. In addition to free scripts, WordPress plugins, and articles, we offer a variety of services including custom theme design, plugin creation, and PHP scripting. Contact me for more information.

Updated Saturday, June 3rd, 2006 at 1:13pm

Windows XP and Vista Product Key Recovery

There are many programs available for extracting the product key from a Windows XP or Vista installation. The only problem is that they generally require the computer to be functional to run. These programs are useless if the operating system is corrupt and the computer will not boot into Windows. Fortunately, there are other options. This article explains how you can retrieve the product key with just the ntuser.dat file from the machine. You can also download a stand-alone version of my decrypter tool.

Windows Vista Users

I have been informed that this method also works on Windows Vista.

Translations

Background Information

While this may not sound very useful to the average user, if you work with computers on a daily basis you have most likely ran into this problem: You have to perform a fresh installation of Windows on a computer with a corrupt operating system, and the product key has been lost. This method makes it easy to find.

Instructions

The first step is getting the ntuser.dat file from the computer. In most cases the easiest method is to remove the hard drive, and connect it to a working machine.

ntuser.dat is generally located here:
C:\Documents and Settings\(User Name)\ntuser.dat
Where (User Name) is the primary account - Most often it is ‘Owner’ or ‘User’

Now that you have the file, you need to be able to view it. I recommend loadhive.exe (Download it here) from matcode.com.

Just run the program and select the file. It will show you a message with more information. It is important that you do not close this program until you are finished viewing the registry, as it temporarily loads the file, and unloads it again when you exit.

Now run regedit. Under HKEY_LOCAL_MACHINE you will notice a new sub-key called NTUSER. Starting with NTUSER go to Software > Microsoft > Windows NT > Current Version.

In the right window, double-click on DigitalProductID. This is the entry that contains the encoded product key.

We want the information in bytes 52 to 66. You can use the chart below for reference. We need the 15 sets of numbers where the 1’s are located.

0000  00 00 00 00 00 00 00 00  ..
0008  00 00 00 00 00 00 00 00  ..
0010  00 00 00 00 00 00 00 00  ..
0018  00 00 00 00 00 00 00 00  ..
0020  00 00 00 00 00 00 00 00  ..
0028  00 00 00 00 00 00 00 00  ..
0030  00 00 00 00 11 11 11 11  ..
0038  11 11 11 11 11 11 11 11  ..
0040  11 11 11 00 00 00 00 00  ..
0048  00 00 00 00 00 00 00 00  ..
0050  00 00 00 00 00 00 00 00  ..

Now that you have the 15 byte encrypted code, you can type it into my decrypter tool:

Web-based version

Windows XP Key Decrypter Tool

Downloadable stand-alone version (exe)

Windows XP Key Decrypter Tool

Just click ‘Decrypt Code‘ and you will have your 25 digit Windows XP product key!

Troubleshooting

If you cannot find the DigitalProductId key in the file you loaded earlier, try the software hive located here:

\%SystemRoot%\System32\config\software

Load it the same way as before. Under regedit, it will generally create the new entries here: HKEY_LOCAL_MACHINE\SOFTWARE_00 (although the loadhive program will tell you where it puts it).

Final Notes

  • The decrypter tool ignores spaces and dashes, and is not case-sensitive.
  • If you cannot find ntuser.dat, make sure you can view hidden and system files.
  • If you are not sure which user account to select, I recommend searching for all ntuser.dat files on the drive, and using the largest one.
  • Do not attempt to open your own ntuser.dat file with Load Hive, because it is already in use, and you already have access to your own registry :)
  • If you cannot find the proper key with the data you need, try the alternate hive file, mentioned in the troubleshooting section above.

NOTICE!

Please do not ask me how to retrieve the product key from your Windows CD - it is not possible. Also, please do not ask general Windows questions here. The comments below are only for discussion of this particular retrieval method. If you have Windows questions, or questions about product keys in general, search Google.

Topic: Tools | RSS Feed

Pages: « 1611 10 9 8 7 6 [5] 4 3 2 1 » Show All

  1. 75
    supraanimo

    I have a copy of Windows XP MCE OEM that I had installed, however a recent bout of spyware rendered some of the system files unusable. I have tried to do a repair install with a Windows XP SP2 Pro disk (original OEM MCE disk is missing) however when I enter the MCE Product Key it comes back with an invalid product key message. Also, when I try to enter the SP2 Pro key it comes back with invalid key. The screen that requests the key is titled “XP Professional Upgrade”, if it is trying to “upgrade” the mce install I don’t see why the SP2 Pro key would not work. Could there be some type of version mismatch, or could the spyware have somehow corrupted the registry on the MCE installation (i am able to load the hive and check the key is valid)? Any ideas would be appreciated.

  2. 74
    Xerxes

    I feel pretty dumb, read all the comments, posted 3 messages, reinstalled a backup set, all before checking the troubleshooting section of the article .. Argh!

    Anyway, the alternate location ‘\%SystemRoot%\System32\config\software’ does contain my encrypted key… lol

  3. 73
    Xerxes

    Well.. I thought maybe ‘Windows Genuine Advantage’ tool had taken additional steps to extract more money out of me, but, after restoring the Acer OEM XP Home disks (they are a password protected norton ghost set, without WGA) to a spare partition, I find that there is still no DigitalProductID under HKEY_LOCAL_MACHINE>NTUSER>SOFTWARE>MICROSOFT>WINDOWSNT>CURRENTVERSION

    This being the case these instructions can’t be correct for all OEM versions of windows.

    If anyone knows what’s up with the Acer, and as someone else noted their Dell laptop Windows install missing the DigitalProductID, but yet still otherwise completely working with WGA, let me know. Cheers ;-)

  4. 72
    Xerxes

    Heh actually that IE DigitalProductID is not even from the NTUSER hive.. It’s from my current PC.

    My copy of WindowsXP Pro sp1a seems to have a DigitalProductID in the expected place, however this copy of XP Home which was current with all updates as of late 2006 does not have a DigitalProductID in any of the NTUSER.DAT hives (that I can find using this guide).

    What’s going on here? Obviously there is a difference, ms has probably changed something?

  5. 71
    Xerxes

    I too have a laptop (Acer) hard disk attached via USB. The problem appears that there is no DigitalProductID in the specified location. There’s only one DigitalProductID and that is under ‘Internet Explorer’ somewhere else in the NTUSER hive (it’s also not encrypted).

    I assume that this laptop was running XP Home Acer OEM.. I kinda need the CD key so I can reinstall onto a new PC (snapped the damn laptop in half ;-).

    Anyone know where else this CD Key might be hiding?

  6. If it is a genuine copy, why not send it to Microsoft for the key.Here in the uk, if a company claims the product is belongs to them and you are paying for the right to use it. then that company must maintain it. as you have paid to use it for the life of that product and in efect you have Highered it and not bought it. Even OEM as Microsoft still claims the copyright. News…Microsoft has bought into Linux- product feys for Linux too!!!!!

  7. mv: If you are able to actually boot into the system, you could run something like RockXP to get the key. If not, you might want to look to see if there is another copy of the ntuser.dat file. Did you already try looking in the alternate location in the registry listed under the troubleshooting section?

  8. hi there.. i followed all the steps exactly and when I got to the current version, there was no digitalproductid key… I’m wondering is there anything else I can do to fix this activation problem? any ideas would be greatly appreciated.

  9. For those with problems sorting out which disk type you are using, example: OEM, retail, academic, VLK etc., have a look at this site http://wiki.djlizard.net/Product_IDs

  10. 66
    Arturo D

    I followed the instructions exactly, connected the recovered SATA HD “D:” and booted to a ATA HD “C:” but every time I run the program (C:\ loadhive.exe – D:\Documents and Settings(User Name)\ntuser.dat), I could only retrieve the product key from the version of windows I was running on drive “C:” (and yes I did not close this program until I was finished viewing the registry).

    What’s up?

  11. I was saying if the worst was to happen, like a drive crash.
    Just wondered if the CD had any thing that could be dragged out. I do build and set up PCs and I have tried to swap the keys it does not work and it also reject one wrong character. in computer properties the ID is converted back to the old windows style (eg.95) this tells me there must be a batch of IDs for types of Windows. So there must be a file to convert,say the first “M” to say a “4″ the next “M” (may be say the seventh character in the key may be a “9″ I find that in my computer properties the key has 20 digits what happens to the extra five charaters in the product key? There must be some covertion file find it is the hard part and work it out. What was that batch file in the resource kit
    where you could instaal windows abd skip the need to be ey the PC.

  12. Michael: The key is not stored on the CD. The only thing the CD contains (as far as that goes) is the function it uses to check and see if a key is valid.

  13. Is there a key finder that can find the key in the set-up cd. You are stuck if the drive packs up and you lost the key or forgot to write it down when you change the PC case. If the label was stuck on it.

  14. 62
    Peter Smith

    Fixed it. I had to take the drive out and put it in another machine as a secondary hard drive - as you advised really. Then I was able to re-install a crack that I had accidentally erased. The crack is in windows/system32/winlogin.exe and it stops the login looking for an activated key. I got it from http://www.antiwpa.jcb.net but I’ve just looked at that site and the crack doesn’t seem to be there now.

  15. 61
    Peter Smith

    I’m sorry, I didn’t explain the circumstances. I was defragging the drive and I wanted to include the virtual memory in that. T do that you have to turn off the paging file altogether and then reboot. It was on the reboot that I got the message to re-enter an activation code. I can’t find the disk and don’t know the code, but once I’m in I have a work-around.

Pages: « 1611 10 9 8 7 6 [5] 4 3 2 1 » Show All

Leave a Comment

Before you comment: If you are having an issue with a script, please make sure you have read the entire article. Also, please read through the comments because most common issues have already been discussed many times. Thanks.


Be sure to wrap all code in <code></code> tags.