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

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

Here we can see, “How to Find Your Windows 10 Product Key Using the Command Prompt”

If you’re looking for your Windows 10 product key, use the Command Prompt to type in a quick command. Here’s how and a neat little trick for locating the product key via the Windows Registry.

Find Your Windows 10 Product Key Using the Command Prompt

  • To use the Command Prompt to find your Windows 10 product key, ensure you have administrative privileges on your computer. To do so, go to the Windows search bar and type “cmd.”
  • In the search results, you’ll find Command Prompt. Right-click it and then choose “Run As Administrator” from the pop-up menu. Enter your Windows account password if prompted.
Also See:  How to: Tansfer Your Windows 10 License to a New Computer

Once the window is open, copy and paste the following command, then press Enter:

wmic path softwarelicensingservice get OA3xOriginalProductKey

After that, the 25-digit product key will appear.

This method displays the Windows product key stored in the BIOS or UEFI firmware of your computer. In other words, it shows the original Windows key that came with your computer. If you’ve installed Windows with a different key since then (or purchased a digital license), the current key on your PC will be foreign. NirSoft’s ProduKey is a good graphical tool for finding the existing key in use on your computer.

It’s as simple as that. This method is quick, but it’s not a code you’ll remember easily. You can use the Windows Registry method instead if you want a faster way to access your product key in the future.

Find Your Windows 10 Product Key Using a Windows Registry Method

Update: How to Find Your Windows 10 Product Key Using the Windows Registry This method is widely used on the internet, but it does not appear to return a valid key in the most recent version of Windows 10. (For example, this script from Microsoft’s TechNet gallery works differently, but it also grabs output from the registry key “DigitalProductId.”) As of July 2020, we recommend skipping this section and instead of using the method outlined above.

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

  • To get started, right-click anywhere on your desktop, hover over “New,” and then choose “Text Document” from the menu.

This code should be copied and pasted 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
  • Then, on the “File” tab, choose “Save As.”
  • Set the “Save As Type” dropdown in File Explorer to “All Files” and give your file a name. You can give it any name you want, but it must be a.vbs file. For example, you can give it a name like productkey.vbs
    .
  • Please save the file after you’ve given it a name.
  • By opening the new file, you can now see your Windows 10 product key at any time.
Also See:  How to: Fix Copy and Paste in Remote Desktop Is Not Working

Conclusion

I hope you found this information helpful. Please fill out the form below if you have any questions or comments.

User Questions:

  1. Can CMD provide me with a product key?

To use the Command Prompt to find your Windows 10 product key, ensure you have administrative privileges on the command line application. After that, the 25-digit product key will appear. This method displays the Windows product key stored in the BIOS or UEFI firmware of your computer.

  1. Where do I look for my product key?

The product key should be on a label or card inside the box that Windows came in if you bought a physical copy of Windows. If your PC came with Windows preinstalled, the product key should be on a sticker on the device. Contact the manufacturer if you’ve misplaced or can’t find the product key.

  1. What if I don’t have a product key to activate Windows 10?

Go to Update & Security > Activation in the Settings app. If Windows isn’t licensed, you’ll see a “Go to Store” button that will take you to the Windows Store. You can buy an official Windows license from the Store to activate your PC.

Also See:  FIX: Age of Empires 3 doesn’t work in Windows 10
  1. Can you tell me where I can find my Windows 10 product key? Can I re-install it on my computer as many times as I want if I already have it?

Where do I find my Windows 10 product key? If I have it, can I re-install it on my computer as many times as I want? from techsupport

  1. A quick guide to extracting your windows product key after a computer crash and you lost your key.

A quick guide to extracting your windows product key after a computer crash and you lost your key. from buildapc