How to make a Registry Script for a Product Key in Note Pad

Daniel Marsh

Well-Known Member
Jun 28, 2015
9,750
2,615
Livingston County, MI, US
✟199,779.00
Country
United States
Faith
Christian
Marital Status
Married
Politics
US-Republican
I read in a book it is possible to do this for Windows 11 while browsing at the library the other day.

Thanks all,
Daniel

This is what I found in that book, what does it mean?
What computer language is it?
where do I download the free software?
How do I run the function?
Should I load the Program name in the Chars string?
How does one open the Registry to find out what is there? Back it up and recover before playing around?

Thanks, Daniel

How to make a Registry Script for a Product Key in Note Pad:

Function ConvertToKey(Key)
Const KeyOffset=52
i = 28
Chars = "BCDFGHJKMPQRTVWXY2346789"
Do
Cur = 0
x = 14
Do
Cur = Cur * 256
Cur =(x + KeyOffset) = (Cur \ 24) And 255
Cur = Cur Mod 24
x = x - 1
Loop While x >= 0
KeyOutPut = Mid(Chars, Cur + 1, 1) & KeyOutPut
If (((29-i) Mod 6) = 0 ) And ( i <> -1) Then
i = i - 1
KeyOutput= "-" & KeyOutput
Endif
Loop While i>= 0
ConvertToKey = KeyOutput
End Function

Save as productkey.vbs

At a cmd which opens the Command Prompt like in DOS

Type this command
wmic path SoftwareLicensingService get OA3xOriginalProductKey
 
  • Like
Reactions: Pavel Mosko