Recently on Blog
Top Posts
Ads
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.
We need to access HKEY_LOCAL_MACHINE\SOFTWARE\ registry hive that is located in the following path:
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:
As we have loaded the offline registry as the "TEST" node, we can actually find DigitalProductId in the following location:
Now to export this key, do following steps:
Selected DigitalProductId section and copy it to the clipboard (Ctrl+C).
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/
%windir%/System32/config/SOFTWARE
- Press the Win+R key combination, Run dialog appears.
- Type in "regedit" (without quotes) and press Enter.
- Confirm UAC prompt to elevate user rights (regedit needs administrator rights to run).
- Regedit tool will appear on the screen.
- Select HKEY_LOCAL_MACHINE key as this will be the place where we will load the offline hive.
- 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.
- Locate and open the offline registry database SOFTWARE file.
- 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
HKEY_LOCAL_MACHINE\TEST\Microsoft\Windows NT\CurrentVersion
- 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.
- On the right pane you will see registry values for the selected key and you should see the DigitalProductId value as REG_BINARY.
- 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.
- 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.
- Click Save.
- 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:- Press the Win+R key combination, Run dialog appears.
- Type in "notepad" (without quotes) and press Enter.
- Notepad will appear.
- 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
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: 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: 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
Thank you,
tom
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).
NBBBB-BBBBB-BBBBB-BBBBB-BBBBB
Thanks alot! :D
Worked perfect.
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.
In this article you can learn how to export offline registry using regex tool that produces output compatible with my app.
especially for corrupt systems
Greatings from Germany
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
Christopher
For me, I needed a lowercase D at the end of DigitalProductId. My key ended in a capital D.
Nothing I do seems to change change it at all.
Dell Desktop Machine with an Embedded key.
Thanks
this laptop was bought as gift from my dad to me but he threw away the box and was able to find out about the digitalproductid and I want to install an older version of Microsoft word but its asking for product id...pls Help if you know how to???
If I copy your tool over to a Wn8 machine ..it now finds the Win 8 Product key.
How do I get an eallier version of your app so I can enter the exported registration data directly ? and do it on the Win 8 machine
Thank you
var isWin8 = (byte)((digitalProductId[66] / 6) & 1);
digitalProductId[66] = (byte)((digitalProductId[66] & 0xf7) | (isWin8 & 2) * 4);
Also, doesn't (isWin8 & 2) always return zero, because you did a '& 1' in the line before?
Thanks for reading...
So even that it seems as obvious fix, I just don't want to mess with something that works, sorry. You can easily fork my project on GitHub and fix it for yourself and see whether it was worth it (I am pretty sure somebody did this before). I am not looking for perfect code here...
Thanks for comment!
As it seems, the code works fine if you just clear the four rightmost bits in byte 66 of digitalProductId. But I wanted to fully understand what this part of the code was actually supposed to DO. Do you have any info about the byte structure of the digitalProductId data from your community discussion that you could share? Why is it suggested that byte 66 actually holds info about the Windows version?
I do not have any info about product key structure, sorry :). Well, nothing more that couldn't be extracted by reading the code. I just got that VB script back then and used it to port it to C#. I just needed trustworthy key finder, so making my own was the motivation, I just didn't bother understanding the key itself.
I know that I did not help you to understand the key structure, but anyway, thanks for comments :).
Pavel
Also, just to note, as I was told, Win11 and up does not store the Product key anywhere in the registry anymore.
I think even for Win10 it becomes a bit obsolete to retrieve keys from registry as even Win10 uses digital activation based on hardware fingerprint and thus no need to retrieve the key for e.g. new installation.
recovered keys on a crashed ssd
As sombody else already said "bloddy brilliant"
I was able to discover that my PC has 3 different Product IDs stored in the registry from earlier instalations but of course is only using one actively for the activation. hence I suddenly have 2 spare keys and product ID i canuse on another PC.
I wish something similar would exist for office keys and ID's
Thanks again !!
Robert