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: « 2616 15 14 13 12 [11] 10 9 8 7 61 » Show All

  1. 165
    vaughn_k

    Great Tools to recover XP Key! In order to recover the XP key without removing the hard drive, I ran loadhive.exe and xpkeydecrypt.exe from ‘inside’ the ’shell’ created by BartPE V.3.1.10a! I needed to use the software hive to get a valid DigitalProductID, however this worked great! For all that are interested, BartPE can be created on a bootable CDROM. Check out
    http://www.nu2.nu/pebuilder/. This ’solution’ of course assumes that the ‘broken’ XP machine will boot from the BartPE CDROM. I hope that this helps…Vaughn !:-) PS – In order to run XPKeyDecrypt.exe from the BartPE CDROM it was necessary to copy the file msvbvm60.dll into the same directory that contained XPKeyDecrypt.exe. (Also, BartPE is useful for ‘operating’ on ‘broken’ XP systems that will not boot to Normal mode or Safe mode!)

  2. I haven’t tried the recovered key yet so I’m not sure it works. I did have a problem when I went to the current version folder in regedit there was nothing on the right side. I then searched for DigitalProductId and found one under IE and the one mentioned in the article. Hopefully this will work. I have spent 5 hours going to sites that assume your pc is up and running. Yours was the first with a resolution pc’s that aren’t.

  3. John: As stated above, the point of this method is for when you cannot boot from the drive to run standard key-finding programs.

  4. 162
    John

    Easier is to download Belarc Advisor (belarc.com). DLs fast, installs fast, gives you ALL the license numbers for all the software on your pc.

  5. 161
    Qureshi

    No matter which ntuser.dat file I try. I get the following message.
    ” The system has attempted to load or restore a file into the registry, but the specified file is not in the registry file format”

    Please help

  6. 160
    Omer

    Hi there

    I need some help, my computer crashed and Samsung Sata hard drive went bad few weeks ago, just before this incident happened, fortunately I did a back up on external hard drive(freecom) through windows back up option , few weeks down the line some thing went wrong with Samsung drive and computer would not boot, it was going in circles coming up to Windows XP logo and restarting again, after several investigation and contacting Samsung finally I got a new hard drive, now the problem is I cannot find my XP cd for my desktop. I was suggested about this site, I restored the back up on Freecom hard drive to be able to see the file including XP pro, I did all the steps as per instruction on this site and following are the results

    1) On loading hive file on 2 users accounts I get message “ User not accessible, assess is denied”
    2) Two of the users do load hive file but I don’t see DigitalProductID
    3) I even tried software hive, I can see software_00 and in right side screen I only see 1 item called Default.

    Plz help how can I get my XP key back so that I can use my other CD to install XP and use my original XP key?

    Regards
    Omer

  7. 159
    Stewie

    Solution to missing DigitalProductID. Use Magical Jelly Bean Keyfinder v2.0 Beta 2½ (at http://www.magicaljellybean.com/beta/). For those wanting to retrieve their keys from another hard drive, you just select ‘Load hive’ from the ‘Edit’ menu, then navigate to the WINDOWS directory on the hard drive in question. That’s it!

    (To the author, I’m SO sorry for posting this here because your efforts are to be highly commended. I reluctantly posted this because I–& apparently others–struggled with this problem. So please delete this post if it’s inappropriate. Thanks for all your hard work!)

  8. 158
    Josh

    NVm about that, Once I open regedit, I have Ntuser\software\microsoft\ctf\etc I do not have windows nt folder… is this a vista problem or what?

  9. 157
    Josh

    OKay, So here’s my problem. I purchased windows vista home premium and used it to upgrade my dell from xp to vista. then from that i purchased a new comp. case and motherboard. Not knowing I had to reinstall windows vista (due to significant hardware change), i had already thrown out my old dell case (which had the vista product key sticker on it). SO now i have Vista installed on my computer (un-activated) and time running out. The ntuser.dat from my previos windows vista installlation is in a windows.old folder however when i try to run loadhive.exe it tells me the ntuser.dat (old one with my product key) is already in use. HELP

  10. 156
    Jouni

    Oops, somehow I managed to use the wrong path in the registry. Works perfectly now. Many thanks.

  11. 155
    Jouni

    The DigitalProductId wasn`t in the ntuser.dat-file so I opened the file from the \%SystemRoot%\System32\config\software root. Now I could find the DigitalProductId but when installing XP it says “Your product ID is invalid”. I did decrypt it ;) What also concerns me, is that the DigitalProductId doesnt change after I close the Loadhive program even after refresh in the registry. It`s not even the DigitalProductId of the computer I installed my hard drive.

  12. 154
    Ron

    This is my encoded key 76487-OEM-0054615-92500 and the binary view does not have enough byte – only 48 where every second byte is 00 (stands for “.”)
    What should I do to recover my product key?

  13. 153
    Carl

    Well, your eg has a counting error. Hex-Decimal & year-Zero.
    Year-Zer0:
    1st Byte= 0000Hx vs. 1 dec.
    0030Hx=48dec= 49th Byte.
    So your GRAPHIC shows from 0034=52= 53rd Byte,
    and shows 0042=66= 67th Byte.

    But text says “Byte 52-66″.

    Web DeCrypt tool:
    This gives a frame shift of 1 Byte.
    Every other Byte is null (00), so mine starts
    with 0034=53rd= 74Hx, or 0033=51= 52st= ooHx.

    Your tool gives Prod IDs for BOTH.

    Would you clarify please? -Carl,Columbus OH

  14. 152
    Bradford

    followed the steps and everything worked great!
    Thanks so much for this great how-to piece!

  15. 151
    Network Admin

    Interesting Read. This was very helpful. Thanks.

    Also, in response to Petty Problems comments…..There are three types of Windows XP product keys: Retail, Corporate, and OEM. Retail is the type you buy from the store. Corporate is for volume license customers. OEM is the copy that is preinstalled on computers (These have a Windows license sticker on the side of the case). Each type of license has a different installation CD. There is a very very tiny difference on each type of disk (Three characters to be exact) that will only allow that installation disk to accept one type of product key. So make sure you are using the proper disk to reinstall your copy of Windows to accept your valid product key.

Pages: « 2616 15 14 13 12 [11] 10 9 8 7 61 » 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.