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

  1. Glad you like it. I have thought about releasing the source, but as you mentioned, I think it is the only site that allows you to decrypt the key online. If I released it, it would be all over the place I am sure. Sounds silly I know ;)

    For what it’s worth, I can honestly assure you that I have absolutely no interest in stealing people’s keys, and that this script does not log anything whatsoever. I do not even know how many times it has been used since I put it up. It simply takes in a value and returns another.

  2. 14
    FunnelVision

    Yup, it works, and AFAIK it’s the only way to decrypt productid’s on the Web. You’ve saved me a ton of work, and for all I know stolen my key in the process. Good luck using it, Microsoft practically knows me by first name.
    What bothers me is that they probably would even if I were a hermetic Amish who had moved to the Gobi.
    Anyway, thanks. I hope you’re honest about this, and I’d be more apt to believe it if you actually released source code or a compiled .exe for us.

  3. Yes.. the 1’s are in the correct position :)

  4. 12
    Dr. Josef Burg

    Thank you very much Admin! Will do that now!

    So are the ‘1’s’ in your chart 53-67 or not? :-)

  5. Dr. Josef Burg: If it is generating the same key as Jellybean, etc.. that is your correct key. The purpose of this method is really just so you can access your key when you cannot boot from the drive (since you can’t run those other tools).

    The message you are getting (the number of times..) is perfectly normal. It just means that XP has been activated too many times. But there is a solution, on the activation screen you can choose the telephone option to call Microsoft and they can take care of it. Just tell them you had to reinstall Windows again, and they will manually activate it for you (they will give you a confirmation code that you type into the activation screen).

    This is 100% legal. They of course have to have some system in place for people who reinstall Windows a lot (for various reasons), otherwise it would be a nightmare for customers.

  6. 10
    Dr. Josef Burg

    I’m trying to fresh install my young (BlueScreenOfDeath)daughter’s XP Pro, but can’t validate it for her on the PC we gave her recently. Forgive me if I’m wrong, but the ‘1’s’ in your chart seem to correspond to bytes 53 to 67 inclusive. When I decrypt those located in these corresponding positions I get the product key as per the OCA, Jellybean, Everest etc.

    If I decrypt those in the 15 slots earlier ie. ‘my52-66′ I get a completely different product key. Neither can be verified.

    The former says ‘the number of times you can activate Windows with this product key has been exceeded’, and the latter can’t be verified. This is like Ford or GM saying one’s car cannot be restarted because too many attempts have been made so it must be stolen. What can a student do now except buy a new CD for $264 as a birthday present – for uncle Bill? How do we refresh her key for her?
    Thanks,
    Jo.

  7. Graham: I just updated the article. Take a look at the ‘troubleshooting’ section. It gives information on another hive file you can try loading for the key.

  8. It sounds like either the hive program did not successfully load all of the registry (it can be tricky to use sometimes), or the registry is missing some data. Was this on a bad hard drive or anything? If so, there may not be much that can be done. You could always search the registry though, just in case that key is located somewhere else.

  9. 7
    Graham

    I tried to use your method to unblock WinXP Pro. The hive program worked, but when I used Regedit I found that in Current Version I didn’t have a digital product key , just AB default Reg_SZ Value not defined. What can I do??

  10. Oh come on.. :P But seriously, I understand your concern. I have been considering putting the source of this up, and I may still do it soon. But I just like the idea of it being the only online script to do it (that I know of) :)

  11. Hey,

    Yeah I do not trust this, you could easily be stelling people’s cd-keys when they run this mug. And you just found a way to do, in which people would think your honest because it looks like it. ;)

    Maybe it’s just me. You should instead allow the user to download the source code and run it on his own.

    cya,

    Will

  12. Glad to hear it :)

  13. 3
    maurie

    I followed instructions and the product key appeared instantly. Thanks,Maurie.

  14. I will think about it ;)

  15. 1
    DJFelix

    Care to post the source code for your PHP XP Key decrypter?

    Cheers!

    Jon

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