How to read Windows 10 Serial Number (Key)

The windows 10 key is stored in the registry as a binary record so you can’t read it.

To read the key the quickest method is to copy the code below, paste to the new notepad file and save as “productkey.vbs” on your desktop.

Then executed file will display the Windows 10 key.

The script should work in Microsoft Windows 7 and 8, however I have not tested this.

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

Leave a Reply

Your email address will not be published. Required fields are marked *

CAPTCHA
Change the CAPTCHA codeSpeak the CAPTCHA code
 

This site uses Akismet to reduce spam. Learn how your comment data is processed.