Enroll Course

100% Online Study
Web & Video Lectures
Earn Diploma Certificate
Access to Job Openings
Access to CV Builder



Online Certification Courses

How to Find Your Windows 10 Product Key Using the Command Prompt

How to Find Your Windows 10 Product Key Using the Command Prompt. 

Image Credits: Makeuseof

If you are currently looking for a way to get your Windows 10 product key, you can easilly find it by just entering a quick command into your windows Command Prompt. Here is just how to do that plus a neat little trick for finding the product key by making use ofa Windows Registry method.

View Your Windows 10 Product Key From the Command Prompt

To get your Windows 10 product key by just using the Command Prompt, you will need to open up the windows command line application with administrative privileges. To do this, type in “cmd” into your Windows 10 search bar.

Image Credits: Makeuseof

The Command Prompt will come up in the search results. Right-click on it and select “Run As Administrator” from the window that comes up. If prompted, just enter your Windows account password.

Image Credits: Makeuseof

Once it is open, copy and paste the following command and then hit the Enter key(Note: Ctrl +v does not work here instead use Ctrl +shift + v)

wmic path softwarelicensingservice get OA3xOriginalProductKey

The 25-digit product key will then be displayed on the screen.

Image Credits: Makeuseof

That is all that there is to it. This way is quick, but this is not likely a code that you will remember very easily. If you would like a much faster way of accessing your product key in the future, you can make use of the Windows Registry method instead.

Find Your Windows 10 Product Key Using a Windows Registry Method

First of all, you would need to open up the Windows Notepad by right-clicking anywhere on the desktop, hovering over “New,” and then choosing“Text Document” from the menu.

Image Credits: Makeuseof

Next just copy and paste the bellow code into the open Notepad:

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

After the above step, click on the “File” tab and select “Save As.”

Image credits: Makeuseof

In File Explorer, make sure that the “Save As Type” dropdown is set to “All Files” and give your file a name. You can use any name, but it has to be a  .vbs file. You can name it something like: productkey.vbs

Image Credits: Makeuseof

Once you have entered a file name, press the enter key to save the file.

Image Credits: Makeuseof

You can now view your Windows 10 product key at any time by just double clicking on the new file.

Image Credits: Makeuseof

Corporate Training for Business Growth and Schools