How to find out the activation key for Windows
January 1, 2021 at 3:08 pm,
No comments
A 25 character product key is used to activate Windows.
It has the form XXXXX-XXXXX-XXXXX-XXXXX-XXXXX.
It is necessary to find out the Windows activation key in several cases. For example, if your laptop or PC has 7 or 8 and you want to upgrade to Windows 10.
There are several ways to do this, consider one of the following.
Let's use the VBS script first. This, in my opinion, is the simplest way that does not involve the use of third-party applications.
To create the script, we create a plain text document. From an empty space on the desktop, right-click and select New from the context menu. In the additional menu, select the "Text Document" item. Double click the new document and open it, then copy the whole VBS script and paste it into the new document you created. Now click in the upper left corner "File - Save As ..", here you can give the file any name, for example, "My key", then write "dot - vbs", click on the line below and select "All files" ". Click Save and the My Key script will appear on your desktop.
Now double click on it and a message about your activation key will open.
VBS script:
-------------------------------------------------------------------------------------------------------
Set WshShell = CreateObject("WScript.Shell") regKey = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\" DigitalProductId = WshShell.RegRead(regKey & "DigitalProductId") Win8ProductName = "Windows Product Name: " & WshShell.RegRead(regKey & "ProductName") & vbNewLine Win8ProductID = "Windows Product ID: " & WshShell.RegRead(regKey & "ProductID") & vbNewLine Win8ProductKey = ConvertToKey(DigitalProductId) strProductKey ="Windows Key: " & Win8ProductKey Win8ProductID = Win8ProductName & Win8ProductID & strProductKey MsgBox(Win8ProductKey) MsgBox(Win8ProductID) Function ConvertToKey(regKey) Const KeyOffset = 52 isWin8 = (regKey(66) \ 6) And 1 regKey(66) = (regKey(66) And &HF7) Or ((isWin8 And 2) * 4) j = 24 Chars = "BCDFGHJKMPQRTVWXY2346789" Do Cur = 0 y = 14 Do Cur = Cur * 256 Cur = regKey(y + KeyOffset) + Cur regKey(y + KeyOffset) = (Cur \ 24) Cur = Cur Mod 24 y = y -1 Loop While y >= 0 j = j -1 winKeyOutput = Mid(Chars, Cur + 1, 1) & winKeyOutput Last = Cur Loop While j >= 0 If (isWin8 = 1) Then keypart1 = Mid(winKeyOutput, 2, Last) insert = "N" winKeyOutput = Replace(winKeyOutput, keypart1, keypart1 & insert, 2, 1, 0) If Last = 0 Then winKeyOutput = insert & winKeyOutput End If a = Mid(winKeyOutput, 1, 5) b = Mid(winKeyOutput, 6, 5) c = Mid(winKeyOutput, 11, 5) d = Mid(winKeyOutput, 16, 5) e = Mid(winKeyOutput, 21, 5) ConvertToKey = a & "-" & b & "-" & c & "-" & d & "-" & e End Function