Jump to content

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


flash13

Recommended Posts

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

index.png

https://www.howtogeek.com/660517/how-to-find-your-windows-10-product-key-using-the-command-prompt

 

If you’re looking for your Windows 10 product key, you can find it by entering a quick command in the Command Prompt. Here’s how—plus a neat little trick for finding the product key using a Windows Registry method.

 

Find Your Windows 10 Product Key Using the Command Prompt

To find your Windows 10 product key using the Command Prompt, you’ll need to open the command line application with administrative privileges. To do this, type “cmd” in the Windows search bar.

xtype-cmd-in-search-bar.png.pagespeed.gp


Command Prompt will appear in the search results. Right-click it and select “Run As Administrator” from the window that appears. If prompted, enter your Windows account password.

 

xRun-as-admin-option.png.pagespeed.gp+jp

 

Once open, copy and paste the following command and then hit the Enter key:

wmic path softwarelicensingservice get OA3xOriginalProductKey

 

The 25-digit product key will then appear.

 

xProduct-key-in-COmmand-prompt.png.pages

 

The 25-digit product key will then appear.

 

That’s all there is to it. This way is quick, but this isn’t likely a code you’ll remember very easily. If you’d like a faster way of accessing your product key in the future, you can use the Windows Registry method instead.

 

Find Your Windows 10 Product Key Using a Windows Registry Method


The Windows Registry tip was initially posted by a user (whose account is no longer active) in the Microsoft forum.

First, open Notepad by right-clicking anywhere on the desktop, hovering over “New,” and then selecting “Text Document” from the menu.

 

xOpen-a-new-text-file.png.pagespeed.gp+j

 

Copy and paste this code into 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

Next, click the “File” tab and select “Save As.”

xsave-as-in-notepad.png.pagespeed.gp+jp+

 

n File Explorer, set the “Save As Type” dropdown 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

 

save-file-type-as-vbs-file.png.pagespeed

 

Once you’ve entered a file name, save the file.

 

xproduct-key-icon.png.pagespeed.gp+jp+jw


You can now view your Windows 10 product key at any time by opening the new file.

 

 

 

 

 

Link to comment
Share on other sites


  • Replies 3
  • Views 1.3k
  • Created
  • Last Reply

Two "Thanks" posts hidden.

 

A gentle reminder that the way to say Thanks is by using the Like or Thanks buttons.

Link to comment
Share on other sites


  • 2 weeks later...
7 minutes ago, hmtkk said:

How to find office 2016 pro plus original product key as well?

 

Office has a different licencing process and registration

All you can get is the last 5 digits of the code or key used

 

Link to comment
Share on other sites


Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...