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. Hi, I was wondering…if someone has BAUGHT a computer from a store with windows xp (any version) and they have the sticker key on the computer can they get a copy of the same OS that is on there computer and intall it. The reason for this would be because the individual does not want all the extra garbage they throw in, in most computers now a’days.

    In short will the key that is on the sticker of the computer work with a copy of the same windows they are using on there pc?

    Also why when running a windows key retreiver (any of the many out there) does it show a diffrent number than the key that is on the sticker?

    Kind reagards
    Ghost

  2. 44
    Imran P

    I talked to the Computing Center and they told me to get a new key, I need to submit a COMPUTER CRASH REPORT….very funny….how dumb they could be….if OS is crashed the only way I can show them is take a picture and show them…or perhaps a movie….hehehe….anyways…i am back to win xp pro 2002 version

  3. Imran: The copy you received from your school is most likely an academic version, which will only install with a matching key. A regular key will not work.

  4. 42
    Imran P

    I have a Windows XP SP2 installed on my laptop. This laptop was given to me from a friend. The problem is he and me doesn’t know the Admin password. So, I was able to get a copy of Win XP SP2 from college. But now I have lost the key. School don’t give me again since their policy restrict it to give it again. I have CD but no KEY. What should I do?. I tried putting the KEY from the laptop SP2 version but it doesnt’ work

  5. Dana: With Windows 95, 98, and ME you can just boot up the computer with a dos boot disk and run DiagPlus which will give you the key: http://www.62nds.co.nz/pg/e23.php

    I cannot imagine how changing the computer name would cause the setup program to re-run though.

  6. 40
    Dana

    Help,

    a girlfriend of mine thought it would be cute to change my computer name and lost my OS. she rebooted and Windows 98 set up came up asking for a product key. how do i retrieve the key if windows will not boot up?

  7. Steve: This tool will not help you for that. You might try asking the manufacturer of the software.

  8. 38
    Steve

    Hi,

    Have a program call CoPilot Live. II have this on my PC and lost the product code to install to my Ipac. Any ideas on how to retrive the code from my PC so I can activate on my Ipac

  9. 37
    imb4tm4n

    Sweet tool. This saved my bacon. My XP Home Upgrade cd was stolen. No biggie, right — I still had the box, which I knew had a Certificate of Authenticity (CoA) on it, and I had a backup of the CD.

    One day my XP stopped booting and I thought ok I’ll just repair the install. So I did that with a backup copy of the CD. Then it prompted me for my Product Key, so I marched downstairs grabbed the box, and there was NO PRODUCT KEY ON THE BOX COA STICKER! WOW and DAMN.

    It seems only the OEM CoA’s have a product key on the sticker (Likely because they are not sitting on the bottom of a retail box for everyone to see.)

    Anyhow, I pulled the drive, stuck it in my external USB enclosure, ran your tool (had to load \WINDOWS\system32\config\software.sav, not any of the user.dats).

    Now to see if I can use this code to complete my reinstall.

    Thanks for making this decode available. Why the hell MS wouldn’t just store this in a string data type in the registry, I’ll never know. The encryption key has to be in the software on the machine, so it’s not like it’s any more secret than the algorithm used to encrypt it.

    W

  10. ok im a bad typist.
    You CAN NOT use a OEM disc with a retail key and visa versa. Any install with 4 discs. (not counting corporate Volume license, of course… which is a different key)

  11. There is no product key “In” the disc. Its on the sticker. The disc is just media. If you lost the sticker or product key the disc by itself is usless. (which is why you can get a replcement from MS for between $5 and $20)

    This is also why you can have only 4 discs and do pretty much an install you need to. OEM Pro and Home and Retail Home and Pro.

    OEM product keys are different than Retail product keys and the discs are not interchangeable. So you can install with a retail disc and use an OEM product key.

    hope that helps

  12. Do you have a way to find the key on a legitimate Windows XP Home CD that has never been used?

  13. Allan: If you are using an XP Pro machine you can reset the permissions on the folders using the ‘change ownership’ feature. The knowledge base has info on it I believe.

  14. 32
    Allan

    This almost saved me a great bit of work. I’ve found myself in the situation, bad copy of windows accessible through good copy on drive. But I can’t get into the main user account due to it being password protected. So far this measure which was required in my previous environmet has cost me my documents and perhaps this solution. Have any hints to helping me get in?

  15. SOLOHelp: I wish there was a way to tell what version of Windows XP a key goes to. It would be very useful. Unfortunately I do not know a way.

    It sounds like you might have a Corporate, Academic, or NFR (not for resale) version of XP. When checking the version, it still shows up a ‘Pro’, but it is not a standard version of Pro.

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.