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: « 21 20 19 18 [17] 16 15 14 13 12 111 » Show All

  1. 255
    Robert

    I have followed the procedures outlined (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)I don’t see the DigitalProductID. Any suggestion?

  2. hello i have windows key FCKGW ……. How to translate like its 00 11 11 11 00 11 11 11
    Thanks

  3. very thank you!

  4. 252
    Asgerix

    I’ve noticed a lot of people asking about the algorithm. It is actually quite simple: You interpret the 15 byte code as a number (little endian), and convert to base 24 using these characters as digits: “BCDFGHJKMPQRTVWXY2346789″ (B=0, C=1, …).

    E.g.: The code “73 02 00 00 00 …” correspond to the number 273 in hexadecimal, which is 627 decimal. Calculating the base-24 expansion you get: 1*24^2 + 2*24 + 3. Using the digits above, this translate to “CDF”. The product key is then generated by padding with “zeroes” and adding dashes for every five digits: “BBBBB-BBBBB-BBBBB-BBBBB-BBCDF”.

    Sorry to Dagon Design for revealing the secret!

    Regards,
    Asger Grunnet

  5. 251
    Christian

    Thank you.

    Had to redo my bosses old computer after a little “accident” he had and OF COURSE he did not have any CDs with the cursed thing.

    This worked like a charm and quickly as well so thank you again

  6. 250
    Mike

    After using the hive and trying to load the ntuser.dat , my vista machine won’t let me acces it. Gives me an error of “A required privilege is not held by the client”

    I’ve googled the error but havn’t found a way around it yet… any ideas?

  7. 249
    kunal

    aarrghhh u ppl actually working so hard to get your pc running GO TO A TORRENT AND GET XP PRO IT WORKS THERE ARE 1000 TORRENT on windows or go get a disc from u friend i use an xp pro that 3 freinds use it works fine only vista has problen with single keys use on 2 pc !!!!

  8. 248
    Mark Laycock

    Works well – and first time – even if I did have to go off and use the SOFTWARE.dat. I have found that it works just as efficiently with recovering Office keys as well – found an Office XP key off a temperamental machine too – of which the owners had emigrated and not brought any of their software with them!

  9. 247
    thedarkprince

    I’ve followed the steps but DigitalProductID isn’t showing up. Any ideas????

  10. 246
    Gary Lee

    As a note, I found the Digital Prodct ID in a slightly different place in the registry from a Vista Ultimate install. It was under HKEY_LOCAL_MACHINE\Schema\wcm://Microsoft-Windows-Security-Licensing-SLC-Component-SKU-Ultimate?version=6.0.6001.18000&language=neutral&processorArchitecture=x86&publicKeyToken=31bf3856ad364e35&versionScope=nonSxS&scope=allUsers\metadata\elements\DigitalProductId\@default. However, once found it worked flawlessly. Thanks. For those who might have trouble finding the right key on their machines. I just searched in regedit for DigitalProductID, and it foudn what is apparently the right thing.

  11. 245
    Nathan

    To find what version of XP you have, you will need to navigate to the following registry key:
    SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide\Installations\x86_Microsoft.Tools.VisualCPlusPlus.Runtime-<some numbering>\Codebases\OS\
    and look at the “Prompt” key.

    I’m also still wondering about that algorithm, anyone?
    I’ve tried searching about but all I could come up with is that some German group discovered and leaked the algorithm but I can’t seem to find it!

  12. 244
    Netty

    I tried it and it works :-) But there is another question remaining: How (and where) can I retrieve the information about the XP version on the disk? Is it Home, Media Center Edition, Pro? This is also necessary for a new installation, because the key does only work with the right version. Any suggestions?

    Thanks and regards,
    Netgirl

    P.S. There is another binary key called LicenseInfo, but its a binary value, so I cannot read it.

  13. 243
    Nathan

    I’m a computer tech and have to recover dozens of Key from customers ruined hard drives.

    I can confirm that this tool works for Win XP, Win Vista, Office ‘07 and Office ‘03.
    It’ll probably work for older versions of Office and probably for Win 7 when it’s released.

    This tool is invaluable to me but one thing I really hate is that you can’t copy and paste the resulting CD Key into something like a text file for easy printing ad reference.

    I also would really love to know the algorithm for the decrypting so that we can integrate it into some diagnostics software we use.

    Thanks,
    Nathan

  14. As stated before, only a very small percentage of discs have this file, containing a key.

    These are special discs that the manufacturer (not Microsoft) configured.

    http://support.microsoft.com/kb/155197

Pages: « 21 20 19 18 [17] 16 15 14 13 12 111 » 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.