RJ1892
[H]ard|Gawd
- Joined
- Apr 3, 2014
- Messages
- 1,347
If anyone is interested in extracting their Windows 10 product key after upgrading use the script below. This also works Windows Vista/7/8 as well. I thought it would be appropriate to post since your product key does change when you update from Windows 7 or 8 to Windows 10.
> open notepad
> copy the code below
> paste in notepad
> save as windowskey.vbs (make sure you select "all files" as file type
> run the file you created
> write down your key
I did not write this script, it was posted on Microsoft.com by a user, but I'm pretty sure it originated elsewhere since I've used it in the past.
EDIT: As Advil said this actually does not work for Windows 10, though it works on previous versions of Windows.
> open notepad
> copy the code below
> paste in notepad
> save as windowskey.vbs (make sure you select "all files" as file type
> run the file you created
> write down your key
Code:
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
I did not write this script, it was posted on Microsoft.com by a user, but I'm pretty sure it originated elsewhere since I've used it in the past.
EDIT: As Advil said this actually does not work for Windows 10, though it works on previous versions of Windows.
This does not work. At least not like you think it does.
I just confirmed that while this tool produces a different key than produkey does, it is still an identical key for all upgrades of the same type. Both my Win 10 Pro upgrades produce the same key after upgrading with this script.
So, no dice. It's still the same key for everyone. (My Pro key ends in HCFC6) I bet yours does too.
Last edited: