Find Windows 10 product key using VB Script

This post will show you how to find your Windows 10 product key using a VB Script. But I have to add that this works on Windows 8.1, Windows 7 and earlier versions too. If for some reason you need to find out your Windows license or serial, then this post is sure to help you find your Windows 10 Product Key.

Find Windows 10 product key

Find Windows 10 product key

Open a Notepad and copy-paste the following:

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

In Save as dialog box, select All files and save this file as a .vbs file, giving it any suitable name like keyfinder.vbs.

Now run this file, and you will see your Windows 10 product key.

Source: Microsoft.

You can also find Windows Product Key using Command Prompt or PowerShell.

If these methods do not work for you, you can also use some free Software Key Finders to recover and save, not just Windows, but even Office, Software, Games serials and license keys.

This post will help you if you want to uninstall the Windows Product Key.

Read our Windows 10 review and become a ninja with these Windows 10 tips and tricks.

Posted by on , in Category Windows with Tags
Anand Khanse is the Admin of TheWindowsClub.com, a 10-year Microsoft MVP Awardee in Windows (2006-16) & a Windows Insider MVP. Please read the entire post & the comments first, create a System Restore Point before making any changes to your system & be careful about any 3rd-party offers while installing freeware.