mrpear.net logo one IT guy's personal web site
ČESKY | ► ENGLISH |
twitter icon flickr icon 500px icon

How to get Windows Product Key from DigitalProductId exported out of registry

This article describes how to decode Windows Product Key from DigitalProductId value which is stored in the registry. This may be useful when we have corrupted system that won't boot up or we just want or need to get the key from system where it is not possible to run key decoder. All we need is to get the DigitalProductId value form the registry of the offline system. Let's read more about it in this article.
There are plenty of tools to get Windows Procduct Key Number from the running (online) system, but what if this is not our case and we need to get Windows Product Key Number from the system that won't boot up or we are just not able to run key decoder there? Well it is possible to decode key from such a system as long as we are able to access offline registry database files from that system and as long as that registry database files are not corrupted.
Ads

Decoding the Windows Product Key Number

The process of getting Windows Product Key Number consist of two steps, first is obtaining DigitalProductId from the registry, the second is decoding that DigitalProductId as Windows Product Key Number.
We can get DigitalProductId value from the registry programmatically (as key decoders usually do) or we can find and export the value using Regedit.exe tool, which is part of every Windows instalation.
Please do not confuse DigitalProductId with Product ID, which can be found in the System dialog. They are not the same. Windows 10 has ProductId in this format: 00330-00000-00000-00000.

Loading registry hive from offline registry

Regedit.exe can load and edit offline registry databases. Registry databases are located in the following location:
%windir%/System32/config/
We need to access HKEY_LOCAL_MACHINE\SOFTWARE\ registry hive that is located in the following path:
%windir%/System32/config/SOFTWARE
Please note that "SOFTWARE" is the name of the registry database file, %windir% points to the system Windows directory, for example "C:\Windows".
To load offline registry database, do the following steps:
  1. Press the Win+R key combination, Run dialog appears.
  2. Type in "regedit" (without quotes) and press Enter.
  3. Confirm UAC prompt to elevate user rights (regedit needs administrator rights to run).
  4. Regedit tool will appear on the screen.
  5. Select HKEY_LOCAL_MACHINE key as this will be the place where we will load the offline hive.
  6. Click on File menu and Load Hive... option. If you have this option greyed out, please make sure you have selected (active) HKEY_LOCAL_MACHINE key.
  7. Locate and open the offline registry database SOFTWARE file.
  8. When prompted for a name give it a name you like (e.g. TEST). The name will be used to create a new node in the tree so we can browse the offline registry.

Exporting DigitalProductId from the registry

We can find DigitalProductId in the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
As we have loaded the offline registry as the "TEST" node, we can actually find DigitalProductId in the following location:
HKEY_LOCAL_MACHINE\TEST\Microsoft\Windows NT\CurrentVersion
Now to export this key, do following steps:
  1. Navigate to the HKEY_LOCAL_MACHINE\TEST\Microsoft\Windows NT\CurrentVersion key (you can copy and paste the key name in the key bar under the menu.
  2. On the right pane you will see registry values for the selected key and you should see the DigitalProductId value as REG_BINARY.
  3. To export the value, we need to export whole key. Right click on the CurrentVersion key in the left pane and select Export in the context menu that will appear.
  4. Export Registry File dialog will appear, choose exported file name and location as needed. Keep "Save as type: Registration files (*.reg)" option and check that "Export range: Selected branch" is selected. You should see selected branch HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion under this option.
  5. Click Save.
  6. Registry key will be exported in the .reg file. Now we can open this file in any text editor, for example in Notepad.

Opening exported .reg file in the notepad

To open exported .reg file in the notepad, do follwing steps:
  1. Press the Win+R key combination, Run dialog appears.
  2. Type in "notepad" (without quotes) and press Enter.
  3. Notepad will appear.
  4. Now you can simply drag and drop exported file on the Notepad window, or you can use File - Open... (Ctrl+O) menu to browse the file. If you can't see exported .reg file, select "All files" from the file type selection drop down.

Locating DigitalProductId exported from registry

Now when you have open exported .reg file in the Notepad, you should see DigitalProductId value among other key values in the following format:
"DigitalProductId"=hex:a4,00,00,00,03,00,00,00,30,30,33,33,30,2d,38,30,30,30,\
  30,2d,30,30,30,30,30,2d,41,41,33,32,38,00,ec,0c,00,00,5b,54,48,5d,58,31,39,\
  2d,39,38,38,34,31,00,00,00,ec,0c,00,00,00,00,a8,d2,7b,6e,89,81,4f,6d,09,00,\
  00,00,00,00,f0,87,99,58,20,9a,d7,4d,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,ff,a1,85,e6
Selected DigitalProductId section and copy it to the clipboard (Ctrl+C).

Decoding DigitalProductId exported from registry

To decode the value, you can use my tool "Windows Product Key Finder" (you can read more about it here: (Yet Another) Product Key Number Finder for Windows). Since version 1.3 this tool is able to decode DigitalProductId exported from registry. You can download the tool directly here: WinProdKeyFind_v1.3.zip.
Windows Product Key Finder is open source, no-install, portable and very simple tool that look like this:
Windows Product Key Finder 1.3
Click Decode DigitalProductId button. Decode Windowss Product Key from DigitalProductId value dialog will appear. Paste DigitalProductId from the clipboard to the DigitalProductId key text box as in the following example:
Windows Product Key Finder 1.3
Please note that it is important to keep exported DigitalProductId in the format as shown in the examples.
If you are decoding DigitalProductId for Windows 7 or older Windows systems (Vista and XP), please select Up to Windows 7 (old) option, otherwise keep Windows 8 and newer (new) option in the version selection drop down.
Finally press the Parse DigitalProductId button to parse the DigitalProductId. Now you should see decoded Windows Product Key Number in the text box.

Final words

We've seen how to export DigitalProductId value from the offline registry database file and how to decode Windows Product Key Number from that value.
Let me know what you think about down below in the comments!
Ads

Comments

20. 5. 2018 9:08:30, Kuba
Díky moc za pomoc!!! Super návod!!!
5. 7. 2018 19:48:16, Ace Carlo
Why it didn't work on my laptop? I got it correct but when i try to use the key it says " You might be using different version of microsoft? Can you explain and help
9. 7. 2018 14:24:36, mrpear
[Ace Carlo] Really difficult to say where is the problem. The sentence about wrong versions leads me to use key for different version of Windows (Home vs Pro, ...)?
9. 8. 2018 4:31:01, Tom
Finally what I have been looking for. Not a coder so I could not edit the VBS scripts I've found that only read the registry. I had a .REG file that I needed converted and your program is perfect!
Thank you,
tom
19. 12. 2018 22:55:24, Brian E McNutt
This tool is fantastic! Love it and very easy to use. Thanks Pavel!
21. 12. 2018 2:48:53, Mark
Worked well, but I can only verify the key when needed. I'll keep it on paper in the pc box.
13. 5. 2019 22:15:45, nektarios
You are my hero! thank you so much. you did great job there and for free.that's the internet everybody contribute in the way he can
12. 6. 2019 13:39:34, Pavlo
Somehow, for all my laptops, it always returns the same product key that I see on your screen. Nothing changes even if I change DigitalProductId to some random value
13. 6. 2019 13:30:12, mrpear
[Pavlo] Depends on what product key exactly you get. There are few generic codes, that are always the same, such as VK7JG-NPHTM-C97JM-9MPGT-3V66T (Windows 10 Pro) and YTMG3-N6DKC-DKB77-7M9GH-8HVX7 (Windows 10 Home). Let me know.
14. 6. 2019 12:35:17, Pavlo
[mrpear] Thanks for answer))) I got VK7JG-NPHTM-C97JM-9MPGT-3V66T for all W10Pro. Stickers with a license have another key. Is it possible somehow retrieve non-generic key for win10Pro? Stickers are to damaged to recognize whole real product key
14. 6. 2019 12:54:25, mrpear
[Pavlo] No, you can't get "real" keys if the system is activated using generic key. But why do you need it? You can reinstall system on the same hardware without needing any product key (just use generic key or even skip this part and just choose right Windows edition), it will be activated using hardware fingerprint without any issues.

Btw, generic keys are used to activated Windows 10 also when upgrading from Windows 7/8.x system.

When any Windows 10 machine is sucessfully activated you do not need product key anymore (for the same hardware).
17. 6. 2019 9:24:29, Pavlo
[mrpear] Very useful answer. I just did not know that licensing is being this way. I tried to find a simple way but it looks like it is impossible in my case. Thank you.
29. 8. 2019 20:01:20, Pratik N Borkar
Hi man i have try to decode the Product ID from Windows 10 Enterprise LTSC 2019 edition but not working itsonly shows

NBBBB-BBBBB-BBBBB-BBBBB-BBBBB
31. 8. 2019 11:26:57, Denis Baturin
[Pavlo] Try to find the registry folder with the name "DefaultProductKey2" inside "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion". If it exists, take the value "DigitalProductId" there and parse it using this utility.
6. 10. 2019 20:11:07, Anonymous
What a great tool! It does exactly what it needs to do. This has saved me a purchase of a new Windows 10 license. I lost the code in a computer crash, but via a Ubuntu Live CD I was able to copy the 'SOFTWARE' file from Windows to a USB stick. I was then able to extract the hex code with a demo version of AccessData Registry Viewer. I could then put it into this tool fairly smoothly. I had to make sure that the layout of the hex-string is exactly the same as in the example, but that took little effort. Thanks again!
31. 12. 2019 12:09:38, user
cool
20. 1. 2020 5:47:44, Fred Williams
Thanks
24. 2. 2020 3:05:41, anon
Thank you for this, digital key decoding worked! However, initial attempt failed. My registry key name is "DigitalProductID" so changing it to "DigitalProductId" did the trick. :)
3. 3. 2020 11:35:20, Bogdan
Multumesc mult!
Thanks alot! :D
Worked perfect.
21. 3. 2020 12:43:22, Marcelo
[mrpear] What other information is stored in DigitalProductId besides the Product Key? Does upgrading Windows 10 (e.g. from version 1903 to 1909) change the value of DigitalProductId?
22. 3. 2020 14:14:05, mrpear
[Marcelo] Sorry, but I do not know what other information is stored in DigitalProductId.
25. 3. 2020 4:03:24, Dan
I used your software but only was able to get BBBBB-BBBBB-BBBBB-BBBBB-BBBBB. Any ideas I what I am doing wrong? I've on a windows 7 pro machine and it has novell zenworks on it (which I am trying to get rid of by reinstalling the windows 7 pro operating system.
25. 3. 2020 11:26:27, mrpear
[Dan] Those sets of keys indicate your were running a volume license client copy of Windows. You cannot use it to activate the system again. Is there option to restore system to factory settings? Or just upgrade to Win10, activate and then reinstall clean Win10.
20. 4. 2020 15:24:46, Anonimo
Does not work
28. 4. 2020 6:57:57, Bradley
Invalid DigitalProductId

I recovered the SOFTWARE file from a Windows 10 Pro that was upgraded from Windows 7 Ultimate.
I used Nirsoft OfflineRegistryView to read the file.
I copied the "DigitalProductId"
I pasted as-is into your tool.
Invalid DigitalProductId

I noticed three differences:
1. "DigitalProductId"=hex(3): instead of "DigitalProductId"=hex: Deleting "(3)" doesn't help.
2. My hex values are in UPPERCASE. Does that matter?
3. When I paste, each line is justified left. It doesn't have a 2-character indent like your DigitalProductId format example.
2. 5. 2020 9:45:58, mrpear
[Bradley] The problem is probably in the format that "Nirsoft OfflineRegistryView" exports the registry. My app requires specific format and if yours is different, it cannot parse it correctly. Sorry I cannot support every tool that exports registry.

In this article you can learn how to export offline registry using regex tool that produces output compatible with my app.
17. 7. 2020 17:30:09, D. Buck
Your Tool is absolutely great, this is what i have looked for.
especially for corrupt systems

Greatings from Germany
10. 10. 2020 2:08:12, Richmond Te
Hi, I got an Invalid Digital ProductId
11. 10. 2020 18:24:36, mrpear
[Richmond Te] Great comment, thank you...
9. 11. 2020 8:24:43, BUCKMARTIN
I THINK IT IS FASCINATING HOW YOU, HAVING STUDIED ALL THIS AND ARE WILLING TO SHARE IN SUCH A PRECISE AND ACCURATE WAY,IT IS GREATLY COMMEMORABLE!THERE'S A LOT TO BE SAID ABOUT CLARITY AND YOU DIFFERENTLY HAVE THAT BRILLIANT,AND I THANK YOU! I WAS ABLE TO FOLLOW YOUR INSTRUCTIONS THROUGH THE OFFLINE TEST IN ONE GO NO PROBLEM, UNBELIEVABLE... BUCKMARTIN...
10. 11. 2020 23:09:44, Max
First run i've got NBBBB-BBBBB-BBBBB-BBBBB-BBBBB,
After reading your answer:
Try to find the registry folder with the name "DefaultProductKey2" inside "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion". If it exists, take the value "DigitalProductId" there and parse it using this utility.
It worke.
Thank you for sharing your knowledge with us.

Max

What do you think?

:
:
(not requiered and non public, used for further contact)
: