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.

Pages: « 1715 14 13 12 11 [10] 9 8 7 6 51 » Show All

  1. 150
    Gal

    Hi, I installed Win XP Prof SP2 on my MAC laptop. The key for this has expired and I want to reload it using my Win XP Prof SP1 after I perform the slipsstreaming process; My Question is will my Win XP Prof SP1 key work? Will my Win XP home key work? I dont know how these keys work and hence need some info. Thanks in advance!!!

  2. To people who have been posting comments, lately, please read the above notice. It says:

    “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.”

  3. 148
    help!

    hey.. good job, but i cannot see any DigitalProductID in either NTUSER or the other one please help me…

  4. 147
    meme

    Very nice work. My recovery disks have died and I had to put a “copy ” ;) of XP on this old machine for the misses while im away cuz she dont speak Linux. I aways thought that I could use my own Product Key in any copy of XP but it was not accepted so I had to use a not so genuine key. Is there a way of replacing my original key in the bytes 52 to 66? of course it would mean doing the reverse decrypting to your excellent tool. Is there a tool to do this already that you know off. Thanks again for this great bit of knowledge and tooling you rock!!

  5. Doug: Always nice to hear from those who find it useful :) Thanks.

  6. 145
    Doug Kopp

    You are too cool. What a great tool and service. Followed
    directions exactly and found the key on a freebee 40G drive.
    It was OEM ver and nothing in ntuser.dat, but found in
    sys32/config/software. Thank you again from an 70 year
    old geezer (an thats what you call a 70 year old-time geek) :)
    Doug

  7. 144
    Paul

    I have genuine WinXP Pro CD but have lost the key. I managed to use the disk to install XP Pro on my laptop (it had XP Home)using a non genuine key, have can I find out the correct key for the cd I have ?

  8. 143
    illyume

    My NTuser.dat file didn’t have the DigitalProductID key, but the Windows/system32/config/software file did. Everything looked fine and such, I retrieved a key, tried inputting it into a Windows install screen… and it said the key was invalid.

    I run (ran, rather) Windows XP Professional Edition. I don’t know if caused the problem, or not.

  9. 142
    jeff

    I used the loadhive application on the ntuser.dat file of a non bootable hard drive but no DigitalProductID was present. I also tried the ntuser.dat file from the system32\config location but then the registry entry couldn’t be opened. Any other suggestions for retrieving the lost key?

  10. Petty: That is true. Some OEMs use ’special’ versions of the CD/key. Although the majority of them do not. For those that do, you have to have the proper version of the CD that came with (at least the make) of the computer to go along with the key. Often times you can tell these by the computer brand being listed on the product key tag, but not all that show the brand are like this.

  11. 140
    Petty Problems

    You really have petty problems, people.

    I happen to have bought a Laptop with a genuine Windows XP Professional License. The Key, or any of the valid one I own, does not work on any of the cracked (i.e. not requiring activation) Version of WinXP, even the most recent.

    So I have come to suspect that there must be a difference between OEM-Installation CDs (Recovery-CDs,Rescue-CDs, all those) that contain WinXP in a congested form and all the others. Your claim that all conventional WinXP CDs are alike might be true, but this goes not for OEM-Systems.

    So there must be a difference in the algorithm that checks the key for every System-Builder-Company. If MS would be really determined to keep me from running a legal key on a different WinXP-CD, they might have hidden several checking functions in the binaries of the Installation Program, and only their order of running through the key might be changed without changing file sizes at all. This would allow for identification of a key contingent of the OEM-Seller.

  12. Michal: Make sure you are opening the ntuser.dat file on the other drive. To view the registry files for other drives (than the one you are booting from), the loadhive.exe program works well (link is above).

  13. 138
    Michal

    Hi, I,ve problem with DigitalProductID. If i load software.saw from connected hard disk E: , In registry editor i see DigitalProducID of my current windows, no windows od connected HDD. Thanks for help (sorry for my english but i’m from Czech republic)

  14. was: Read the section above, under the big red ‘Notice’ text.

  15. 136
    was

    i coud not read the product key from thoperating system cd of window xp. please how can i get it?

Pages: « 1715 14 13 12 11 [10] 9 8 7 6 51 » 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.