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. If you are chasing the XP key – and have the disk handy (or at some stage had copied the disk contents to your HDD) – but don’t have the actual key (or Cert of Auth with the key) …. do this
    - Insert your XP disk (or browse to the folder on your HDD where you copied it’s contents)
    - Navigate to the i386 folder
    - Locate a file within this folder called UNATTEND.txt (not hidden)
    - Open UNATTEND.txt in Notepad
    - Scroll to the very bottom…. there will be your key

    Have checked and tried with various copies of XP – all have it and all keys are different (well the ones I checked anyway).

    Does not apply to VISTA – had to use the most awesome method provided here to gain the VISTA code after C.O.A was tossed in the trash … thanx DagonDesign – much appreciated

  2. 239
    nathan

    hi i dont get any of this my windows xp needs validating and i dont have a key im only 13 so im not exactly a tech specialist and i dont know what to do
    i have 4 days left for activision can anyone help me out

  3. 238
    Kirk

    This was awesome. Thanks.

  4. 237
    Markus

    I read through some of the comments and a few people asked if there was a way to determine the type of install, ie OEM, Retail, Volume. Well the answer is simple. Load the system hive and once it is loaded, navigate to the Setup key, and then the Pid key. There you will fine a String with a value that tells you the install type. Its 8 digits long. The last 3 digits tell you the install type. OEM is OEM. 000 or 335 is Retail. 270 is Volume License. I hope this helps someone.

  5. 236
    Dexter

    My windows failed and I made my hard drive a slave drive and was able to retreive my original ProductID through your GREAT INFORMATION!! I have a disk I reloaded XP Pro with on a new hard drive. When I get to where I put in my original ProductID it says not valid. What Im wondering is if after I load windows with the old ProductID if i’m able to go to regedit and go in and double-click on DigitalProductID information in bytes 52 to 66 and change it back to what it was originally for my original ProductID that was registered to me.

  6. I first tried the first method from a USB thumb drive having downloaded the stand-lone program as well as the hive program to the USB and using Bert’s PE (after trying with Winternals) to access the program hive and then use Regedit. Still I did not see the DigitalProductID in the right-hand pane. I saw nothing at all. Then I went to the second method under the Software_00 and had the same result – no right-hand pane. It was not until I connected the problem drive into a working machine that I was able to see the right-hand pane and then to find the DigitalProductID and only under the software_00 not the first method.

    Many thanks for such a great program. I tried many ways to find that damn number for the XP install, but only this method worked.

  7. 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:

  8. 233
    Cam

    OK, the XP CD doesn’t have a working key on it. It might have something like a working key if you have an OEM installation CD from Dell, but it won’t be YOUR key. This works perfectly. If you need to pull data off another drive, use the Load Hive command, and you can find it under the C:\WINDOWS\SYSTEM\CONFIG\SOFTWARE key. It usually works for me. Thanks for the wonderful solution. Anyone know if this works on Windows 2000? Silly I know, since it doesn’t activate, but I was curious.

  9. 232
    lee

    Tried the method above using loadhive which i pointed at my slave drive which has XP on it and im trying to get code off it.
    But when i load regedit it always finds the code from the master drive.
    Any help out there as i definitely pointed loadhive at drive in ? but it always reverts to copy of XP loaded on system
    HELP!!!!!!!!!!!!

  10. 231
    Shane

    It is possible to retrieve your product key from a windows installation cd. Its called viewkey. You run the program and its limited to some windows OS and IE etc…..

    You insert the CD/DVD and it will reveal the product ID and Product key

  11. Those information helped me a lot after a hard drive crash. Thanks a lot.

  12. 229
    Carter

    I wanted to find out, I was installing Windows XP SP2 on my PC and it replaced my OS of Media Center Edition 2005. So I carried on until it came to the point where I type in the Product Key. I have the product key on my disc but once I type it in it says “The Product Id you entered is not valid.” What must I do in this situation as I really need the installation to be successfull?

  13. 228
    Ken

    Thank you. I find frequent need of a procedure to extract the product key from an XP installation that wont boot. I cant tell you how often I have users that cant find the box, threw out the box, dog ate the box, We never kep the box. It’s nice to have a way to help them.

    Now if I could only find a proggie that would allow me to enter an XP product key…and have it tell me which version it’s for…OEM Pro, OEM HOME, retail Pro, retail Home, upgrade, media center etc!

  14. 227
    FiL

    I would like to thank you for this ever-useful tip.

    And I would like to report with ecstasy that, following a very similar method, one’s Microsoft Office key can also be extracted!

    Just load the SOFTWARE hive from whichever machine you need it from, from \%SystemRoot%\System32\config\software
    Then, select Microsoft > Office > 11.0 > Registration
    OR Microsoft > Office > Registration if there is no “11.0″ subdirectory.

    Finally, double click on “DigitalProductID” from the aforementioned registry entry and from herein do exactly as you would to extract your XP key (see way above for instructions).

    I’m guessing that both Office and XP install keys use the same method of encryption, enabling this method to be applicable.

    HKEY_LOCAL_MACHINE

  15. 226
    Matt

    This is a FANTASTIC tool! I use it a lot. One thing: Could you make one that does it in reverse–an encrypter?

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.