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.

Windows Vista/7 Users

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

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

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: « 2611 10 9 8 7 6 5 4 3 [2] 1 » Show All

  1. Hey you’re a wealth of info!!

    Is there any way to tell what version was used for install by the product key?
    I pulled the product key and verified that it was a retail xp pro disc used for install. (using Everest) The pc is still bootable but the harddrive is quickly dieing.

    however when I install using a retail pro or oem pro or pro upgrade I get invalid product key. I even tried some old no sp and sp1 discs. Is there a way to put in a product key and it tell you what disc to use?

  2. Drew: Good to know :) Thanks.

  3. 28
    Drew

    Hi Admin,

    I’m a PC repair tech who frequently works with bad (non-bootable) HDs and Windows activation. The offline version of the decrypter worked great with a Windows 2000 repair. If others report success with Win2K you could say that your tool supports it as well.

    I don’t think you should make the code public, simply so you don’t have people doing malicious things with it. But keeping it free is a good idea.

    Thanks!

  4. A stand-alone version of my Windows XP Key Decrypter Tool is now available for download! You will find the link above. Enjoy! :)

  5. Richard: I have an early version I made for Windows, but it needs to be cleaned up. I will consider it :)

  6. 25
    Richard

    Do you have the decryter available for “Offline Use”. It worked great but I’d love to be able to use it offline on my laptop since when I am working on a system I am sometimes where there is no “Online” connection available? PLEASE!!!

  7. 24
    OUberLord

    Great tool, that’s exactly what I needed.

  8. 23
    Imran

    WOW thanks for this wicked tool!

  9. I have never seen that message, and a google search shows 0 results. Are you sure it is “setup entry key detected” exactly?

  10. 21
    lAbArYnth

    I know this is off topic, but I have a machine that will not boot into windows.
    A “setup entry key detected” error appears very briefly after exiting BIOS and nothing after that, just blank screen.
    I can F8 into boot options but also blank screen after selecting option.
    It seems as if something is preventing windowsXP from booting.
    Would appreciate any help Thanx

  11. 20
    Nigel

    Sorry just saw my mistake between the decimal numbers you gave and the hex numbers on the illustration

  12. 19
    Nigel

    I have located the digitalproductid but on the 2 machines that i have looked at both of them have 00 located in the appropriate spots.
    I can see the productinfo numbers located at the begining of the code. Any help would be appreciated

  13. Nice Work!

  14. Cj: The purpose of this method is for when you can’t boot from the drive. If you can, there are other options. I personally like the Magical Jelly Bean Keyfinder – http://www.magicaljellybean.com/keyfinder.shtml.

  15. URRRGHH I can’t get to mine due to it being in use since I am using the main account, which is the only account… damn.

Pages: « 2611 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.