logo one IT guy's personal web site
twitter icon twitter icon google plus icon flickr icon 500px icon linkedin 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.

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


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

What do you think?

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