Every virtual commercial product available for purchase usually comes with an activation code you mustn’t share with anyone. It’s the basic method of preventing theft and even Windows does it.

Just like everything else, there’s some chance that you can lose, at least temporarily, the piece of paper, card, or whatever the product key is written on. Although recent Windows iterations get installed without necessarily writing the product code, but it’s required for activation to use all of its features later on.

Microsoft didn’t implement any kind of utility or feature that displays the product key, but as seen on the web, there’s a sneaky way to bypass this issue. Whether you lost it or want to keep it safe for a fresh install of Windows, these are a few methods you can use to find the product key.

Creating a script to fetch the key

Step 1: Create a new plain Text Document under whatever name you consider fit.

Step 2: Open the document and paste the following code:


CODE

Set WshShell = CreateObject("WScript.Shell")
MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Micro soft\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


Step 3: Under the File menu, choose to Save As.

Step 4: When the dialog appears, change the type to All Files from the drop down menu.

Step 5: Give the new file any name, but add the .VBS extension in the end, and hit OK.

Step 6: Launch the file to view your code. It can even be copied from the dialog box, or better yet, written down on a piece of paper, or telephone note.

Using Third-Party Programs

Step 1: Download and install ProduKey.

Step 2: Run it and look for your version of Windows.

Step 3: You’re looking for the Product Key column, NOT Product ID.

Step 4: Right-click the item and decide whether to export as different text documents, generate a report, or copy it to the clipboard.

Note: When reinstalling Windows and plan on using the same key, make sure you use the exact Windows Edition, otherwise the product key is not accepted.