How to recover your Windows product key

Technical Level : Basic

Summary

If you are planning to reinstall Windows but you can't find your product key, this article will show you where and how you can find your product key.

The key could be:

  • Printed on a Certificate of Authenticity sticker
  • Stored in the Windows Registry
  • Embedded in the PC's UEFI firmware

Note that if you are currently running Windows 10 and wish to reinstall the operating system, you don't need your product key. After the reinstall, Windows 10 will detect that it has been reinstalled on a previously activated system and will automatically reactivate.


Details

Printed on a Certificate of Authenticity Sticker

If your PC came with Windows 7 or earlier, then your product key will be printed on a COA sticker. This sticker verifies that the computer came with a genuine copy of Windows. You will need to examine your computer to find the sticker. On laptops, it's usually on the bottom side. On desktops, it could be on the back, sides, or top. It looks something like this:

Embedded in the PC's UEFI firmware

If you have a newer PC that came with Windows 8 or Windows 10, then your product key likely won't be on a sticker. Instead, computer manufacturers now embed the key right into the computer's UEFI firmware. Unlike the COA sticker, the embedded key can't be smudged off, stolen or erased (easily).

If you want to extract the UEFI key, the process is simple. Open the Start menu, type powershell and then run the program.

Next type the following command in the PowerShell window and hit Enter.

(Get-WmiObject -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey

You will be presented with the key in the window.

Stored in the Windows Registry

If your product key isn't embedded in the firmware or you're missing your COA sticker, you're not out of luck as long as you haven't formatted your computer. You can still recover the key because Windows stores it in the registry. Here is how:

1. Open a new Notepad window

2. Copy and paste the following text into the window

Set WshShell = CreateObject("WScript.Shell")
MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"))

Function ConvertToKey(Key)
Const KeyOffset = 52
i = 28
Chars = "BCDFGHJKMPQRTVWXY2346789"
Do
Cur = 0
x = 14
Do
Cur = Cur * 256
Cur = Key(x + KeyOffset) + Cur
Key(x + KeyOffset) = (Cur \ 24) And 255
Cur = Cur Mod 24
x = x -1
Loop While x >= 0
i = i -1
KeyOutput = Mid(Chars, Cur + 1, 1) & KeyOutput
If (((29 - i) Mod 6) = 0) And (i <> -1) Then
i = i -1
KeyOutput = "-" & KeyOutput
End If
Loop While i >= 0
ConvertToKey = KeyOutput
End Function

3. Click File > Save As and save the file to your desktop as productkey.vbs. It's important to include the .vbs extension because this is a Windows Scripting Host file.

4. Close Notepad and double-click the file. Wait a few seconds, and then you will be presented with a popup displaying your product key:

Was this article helpful?

Yes
No

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this article?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this article?

Thanks for your feedback.

* Please try a lower page number.

* Please enter only numbers.

* Please try a lower page number.

* Please enter only numbers.

Why are you stating "the exact opposite of the truth" here?
In FACT the true correct key is on the Windows COA.
Even if you upgraded to Windows 10, that Windows 7 COA can be entered if must reinstall.  I have never had to do that for the same key on the same PC.

A Windows 7 OA key can be transferred.  I just swapped Windows Home with a  Windows 7 Pro OA COA  -  my PC already upgraded to Windows 10 Home. 

To sum up, Windows 10 info is stored on Microsoft servers, I don't know of anything that can be extracted except the generic Windows Product Key for your exact version: Windows 10 Pro Education N, Windows 8.1 Enterprise etc.

3 people found this comment helpful

Was this comment helpful?

Yes
No

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this comment?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this comment?

Thanks for your feedback.

You may need to change the code to DigitalProductId4 if it is 64 bits, that's what I had to do.

Was this comment helpful?

Yes
No

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this comment?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this comment?

Thanks for your feedback.

Reply In reply to deleted message

I upgraded from Windows 7 pro to Windows 10 pro. Before upgrading, I noted the Product key from Windows 7. I then installed Windows 10 but the product key I recorded does not allow me to activate Windows 10. 

I understood that the Windows 7 product key would work to activate Window 10. Is there anything I can do to activate Windows 10? Should the product key I have work or do I need to purchase a new product key.

I would appreciate any comments/suggestions. Tx

Was this comment helpful?

Yes
No

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this comment?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this comment?

Thanks for your feedback.

I accidentally deleted windows 10 on my laptop can I get the genuine windows back by installing it by a cd. 

Or will I have to buy it again.

please answer soon.

Was this comment helpful?

Yes
No

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this comment?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this comment?

Thanks for your feedback.

Hello,

I have a dell pc with no opperating system at all. And i need a disk to install an opperating system. And to find the right disk, i need the windows number. Where do i find it if i cant really go on the pc, and i dont know what it's previus version was?

Thanks you

Was this comment helpful?

Yes
No

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this comment?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this comment?

Thanks for your feedback.

How do i gain access to my computer when acpi has shout the thing down on me with acpi suspend mode s3(str) and cant get my computer to boot fully . im a member of insders and i when to site and signed on my work email and a xoulpe days later they sent me an email saying come get volume licensed key. But before i can get 10 installed this acpi shut me down . how do i fix this problem

Was this comment helpful?

Yes
No

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this comment?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this comment?

Thanks for your feedback.

You need to save the file as "vbs" and duble click on the "key.vbs" or how ever you want to name it

Was this comment helpful?

Yes
No

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this comment?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this comment?

Thanks for your feedback.

I used the third method. I had a Product Key, entered it and the system announced that my Product Key wasn't valid

Was this comment helpful?

Yes
No

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this comment?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this comment?

Thanks for your feedback.

hello,how now do i change or insert the product key?

Was this comment helpful?

Yes
No

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this comment?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this comment?

Thanks for your feedback.

happy to find and change my product key by the help of the powershell step.Kudos.

Was this comment helpful?

Yes
No

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this comment?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this comment?

Thanks for your feedback.

* Please try a lower page number.

* Please enter only numbers.

* Please try a lower page number.

* Please enter only numbers.

 
 

Forum Article Info


Last updated September 22, 2021 Views 356,714 Applies to: