AntiMalware Status

How to find out Windows 10 key after upgrade from Windows 8

I was asking this question myself as well. How to find out the correct Windows 10 license key on machine that I have just upgraded from previous Windows 8 or Windows 7. If I tried to find out the old way it gave me wrong key that was not valid. Thanks to Chris Goulard from #CANITPRO community, this is now simple task. He has written this script that does exactly what we were looking for. Provide us with the correct Windows key. You can run in on the old machine before you upgrade and then run it again once you complete the upgrade to Windows 10.

Here is the 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
Cur = 0
x = 14
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 

Save the file as Windows10Key.vbs and move it to your C:\> drive. Once done, press Windows-key+R and type in csript.exe “C:\Scripts\Windows10Key.vbs” and press ENTER. Shortly you will get a popup window with the correct Windows 10 License key applied to your machine after your upgrade from previous version of Windows.

Leave a Reply