Recover Lost Windows Product Key

Here is how you can recover a lost Windows Product Key

Microsoft is one of the biggest developers of software around the world, licensing its software like Windows to hundreds of manufacturers to run on their PCs, earning billions of dollars in the process. Not only that, but its Office productivity suite is also one of the most popular software suites sold today.

Both of these softwares, the Windows Operating System, and the Microsoft Office suite of products come at a hefty price – costing a couple of hundreds of dollars. While Windows has turned into a subscription-based model now, you’ll still need the product key if you are planning to reinstall Windows on a different PC.

If you are planning on re-installing Windows on a different PC or just planning to do a fresh reinstall on the same PC, it is necessary to know the Product Key you used to install them in the first place.

Fortunately, there is a really easy you can recover the product key. Here, we have listed how you can do it,

Recovering Key from PC Hardware

If your PC came pre-installed with a modern version of Windows like Windows 10 or Windows 8, it is likely that the key is stored in the computer’s UEFI firmware or BIOS by the manufacturer. What this means is that you can easily reinstall the version of Windows the PC came with, without being asked for the Product Key. Windows will automatically retrieve the key from the PC’s UEFI hardware.

However, it is still best to know the product key just in case you might need it later. Here is how you can do it using Windows Power Shell,

  1. Press START + S to open Windows Search, and type PowerShell and click on the search result, as shown in the image below.
  2. Type the following command and press ENTER,
    (Get-WmiObject -query ‘select * from SoftwareLicensingService’).OA3xOriginalProductKey

Windows will extract and print the Windows Product Key on the screen, as shown in the image below.

Reading the Key from the Authenticity Sticker

Image result for authenticity sticker windows

Some manufacturers also use a single key for all their PCs. If this is the case with your PC, you won’t be able to use that key to install Windows yourself. However, if you still want to find out the key, you can look for a certificate of authenticity sticker on your computer.

The Certificate of Authenticity sticker is proof that the computer came with an authentic copy of Windows, and that sticker has a product key printed on it.

Finding the Windows Key using Microsoft Visual Basic Script

If you don’t want to use any third-party software to find out the Windows Key, you can also use Microsoft’s Visual Basic Script engine to find out the Windows product key. Thanks to a script posted over on this discussion forum, it is pretty easy to do that. We have pasted the code and the steps you have to perform to run it below.

  1. Open Notepad.
  2. Paste the following code.
Set WshShell = CreateObject("WScript.Shell")
MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"))

Function ConvertToKey(Key)
Const KeyOffset = 52
i = 28
Cur = 0
x = 14
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. Save the file as productkey.vbs, as shown in the screenshot below.

4. Now, all you have to do is double click the file and it will show you your Windows Product Key.