Find Windows product / serial key

To find product / serial keys for Windows or MS Office I normally use NirSoft ProduKey. You can download v1.70 from here: 32bit / 64bit. Or look for the latest version on developers’ website.

NirSoft ProductKey

Recently I also found a simple .vbs script that decodes Windows serial number from registry. I always try to attribute developers, but in this case I’m not sure who is the original author of this script…

 

 


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

Be aware that some versions of Windows (particularly volume license) don’t have license key encoded in registry which makes it not possible to recover it using software utilities. In these cases the recovered “key” often appears as “BBBBB-BBBBB-BBBBB-BBBBB-BBBBB” or something similar.

Also, some OEMs sell computers with proper Windows license key stickers, but pre-installed Windows version is activated using generic license key assigned to that particular manufacturer. For example, serial number for pre-installed Windows 7 Professional on DELL hardware often is: 32KD2-K9CTF-M3DJT-4J3WC-733WD, however Windows sticker on the PC/laptop itself has a proper and unique license key.


Comments

Leave a Reply

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