Last Updated:

Find Your Windows License Key

Arsen Karapetyan

Have you lost your Windows 10 or Windows 7 license key? Is it time for your to reinstall your operating system and you can't do it, because you can't find your Windows License key? Follow the steps below to easily recover it from your system.

  1. Create a text file
  2. Open the text file with a notepad app
  3. Paste the following code into the notepad app

Copy everything below this line

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

Set WshShell = CreateObject("WScript.Shell")MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"))Function ConvertToKey(Key)Const KeyOffset = 52i = 28Chars = "BCDFGHJKMPQRTVWXY2346789"DoCur = 0x = 14DoCur = Cur * 256Cur = Key(x + KeyOffset) + CurKey(x + KeyOffset) = (Cur \ 24) And 255Cur = Cur Mod 24x = x -1Loop While x >= 0i = i -1KeyOutput = Mid(Chars, Cur + 1, 1) & KeyOutputIf (((29 - i) Mod 6) = 0) And (i <> -1) Theni = i -1KeyOutput = "-" & KeyOutputEnd IfLoop While i >= 0ConvertToKey = KeyOutputEnd Function

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

4. Save the text file

5. Rename the text file's txt extension to vbs and press enter on your keyboard

6. Run the file and you will see your Windows license key

You are welcome. Hit the notification icon on the right corner to get notified when I post the next tech article!

Comments