Skip to main content
InSource Solutions

TN WW253 How to find your product key for any windows machine

InSource_Logo_Transparent.png

Description

 

This article from InSource shows how to find your Windows product key.

  • Author: Chris Cleope
  • Published: 12/19/2019
  • Applies to: Windows Machines

Details

  1. Create a new notepad document and copy 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

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

  1. Save the notepad document as productkey.vbs and the save type as "All file"
  2. A new vbs file should be create in the destination of that text and when you click on it your product key should be listed.

clipboard_e76f4db32f6d4b76469a4de50bc7b28b9.png

  • Was this article helpful?