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.

  If you have found this page useful, please consider donating. Thanks!

Pages: « 2012 11 10 9 8 [7] 6 5 4 3 21 » Show All

  1. 105
    Nick

    I decided to test this by copying ntuser.dat from a friend’s computer but I encountered a problem. There were 6 ntuser.dat files on the computer ranging in size from 768 Bytes to 8704 Bytes. I wasn’t sure which one to select so I decided to copy all to my flash drive to take them back to my computer to complete the rest of the steps. All but the largest copied properly but each time I tried to copy the largest one I encountered an error message that copying couldn’t be done because the file was in use by another program. I suspect the largest file was the one I needed because that is the one you recommend that users select when there is more than 1 although someone suggested that the oldest ntuser.dat is the correct choice. I do know the method is intended for “dead” computers but is there a problem testing it with “live” ones that are booted to Windows?

  2. Doug: Did you actually read the entire article? The main purpose of this method is for when you cannot even boot to a drive, but want to pull the key off. What good is a normal keyfinder utility when you cannot boot from the drive to run it?

  3. 103
    Doug

    You’re all full of baloney. Use Keyfinder151.Zip (exe) Download, extract the zip, run it and you’ll have the key in about half a second. Works on ‘95,’98, 2000, XP, and vista.

  4. prakash: I have mentioned this many times in the comments – there is no number stored on the CD itself. The only thing on the CD is the function used to determine if a key is valid. If you have lost your product key the only thing you can do is purchase a new copy.

  5. i have original windows xp disc but lost my product key due to this i have trouble to install this. so plese tell how to find product key from windows xp disc.

  6. 100
    David

    Just wanted to say thanks for providing these tools and info! I’ve been wanting to move my XP Pro copy from my desktop (which no longer boots into Windows) to my laptop.

  7. fred: There is no key stored on the disc itself, so it is 100% impossible to extract a key from it.

    Everyone: Please do not ask general XP key questions in here – this page is for discussion of the key recovery tool available above. If you have questions regarding the keys themselves, or questions about XP, please ask them elsewhere. There are a lot of XP forums out there.

  8. 98
    fred franz

    I am trying to determine the product key of a CD disk which
    has the XP installation setup program on it.
    Can you advise on how to this?
    sincerely FWF

  9. Phone Microsoft they will be able to help you.

  10. Wayne: Here is an article which explains how it works, so I do not have to explain it :)

    http://ask-leo.com/how_do_i_find_the_windows_cd_key_from_the_cd.html

    An excerpt:

    “The fact is that for any given version of a Windows CD, the CDs are all the same. The key to unlock the CD is not stored anywhere on the CD. If it were, each CD would have to be slight different, – it’s not quite a manufacturing nightmare, but it’s at least a bad dream.”

  11. 95
    Wayne

    If the key is not on the cd, what does it validate the number you type in to, to make sure that it is valid?

  12. David: The 1’s in my example just represent the position of the actual numbers you need to enter into the tool to decrypt.

  13. 93
    David Peter

    I am trying to recover the key to windows XP like in your article.I found the digitalproductid after doing your trouble shoting measure. I loaded the Software_00 hive. I do not see a pattern with 1111’s in it
    my text is something like this.
    a4 00 00 00 03 00 00 00
    37 36 34 37 37 2d 4f 45
    and so on
    I could not find the the KEY under the user.dat when I loaded it
    COuld you help me out?
    Thanks
    Dave

  14. Bryan: If it has never been opened, the key should be inside. If not, then there is no real way to recover it, as there is not a specific key ‘tied’ to each CD – you just need a valid XP Pro key. This means there is no way to try to pull off a key from the CD. I do not mean that it would be hard, I mean there is no key stored on the CD itself.

  15. 91
    Bryan

    I have Windows XP Pro (full version). It’s never been opened, but I lost the product key. How do I get the key?

    P.S. It hasn’t ever been installed.

Pages: « 2012 11 10 9 8 [7] 6 5 4 3 21 » 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.