HackGh Community Forum

Log in

I forgot my password

Who Is Online?
Guests : 0
Hidden : 0
Registered : 0
Users Online :
Refresh View the whole list

Latest topics

google  5513  8  10  Critical  keepCalmAndLOVEHACKGH4life  DumsormustSTOP  2  7  11  phAnt0m_DrAcON  policies  3  21  2000  4  6  terms  1  Unlimited  3264  30  HackGh  9  intl  5  

Top posting users this month

Free counters!
Staff Online
Staff Online
Most Online179
Newest Member
BBC alternative

You are not connected. Please login or register

 » Computer Tricks And Technology Tips » Pc ( Windows ) Tips & Downloads » 

How To Find Windows Product Key Using CMD, PowerShell, And Windows Registry

View previous topic View next topic Go down  Message [Page 1 of 1]



Very often we misplace the original installation media that came with our brand-new computer. In those times, such methods are very useful.

While reinstalling your Windows operating system, you might also face the trouble of misplacing your Windows product key. Let me tell you, sometimes it could turn out to be a really frustrating affair.

I, personally, find it hard to understand why Microsoft makes the process to find Windows key so difficult. It could only be explained with the assumption that Microsoft doesn’t want you to use Windows keys from older computers.

After you install Windows operating system on your computer and activate it, Microsoft stores it in Windows Registry–something that’s impossible for humans to read. Nowadays, Microsoft has also stopped putting Certificate of Authority stickers on machines, which showed Windows keys.

How to find Windows product key by just ‘looking around’?

If you are familiar with a Windows product key, you might be knowing that it’s a 25-character alphanumeric code that’s used to activate Windows operating system. It looks something like this:


Sometimes, your Windows key could be just located or printed in plain sight. Here are few ways to find Windows key by just looking around:

1. Windows key on sticker/label:

When you buy a new PC, it comes pre-activated. It’s possible that you don’t need to open your command prompt or play with Windows Registry. Your Windows key could be there right in front of you on a Certificate of Authority (COA) sticker on your computer, or included in the original packaging. If you bought the PC from an authorized Microsoft retailer, you need to find Windows key on a label inside the PC box.

The COA sticker on your computer verifies the authenticity of your Windows computer. It could also be found under the battery if it’s removable. If you own a desktop PC, you’ll spot the COA sticker on the side of the desktop case.

2. Windows key in an email from Microsoft:

Just in case you bought your Windows copy from Microsoft’s website, you can find your Windows product key in an email from Microsoft guys. The company sends a confirmation mail after you complete the purchase.

3. Windows key in PC’s UEFI firmware:

These days, OEMs ship computers using a new Windows activation method. Instead of providing a physical Windows key, they store in your computer’s UEFI firmware or BIOS. So, if you know which version of Windows you are running, you can reinstall the same version and it’ll activate automatically–without the need to enter a key.

Similarly, if you wish to upgrade your legal and activated Windows 7 or 8.1 computer, you don’t need a key. Microsoft will activate your Windows copy on its own (before July 29, 2016) and you’ll receive a digital entitlement for Windows instead of a key.

How to find Windows product key using — Windows Registry method

To go ahead with this method, you need to boot your Windows computer without. Now, using a simple VBcript–some of you might have seen it on Microsoft forums–you can read all the binary gibberish written in Windows Registry. This script translates the Registry values into a readable format.

So, just copy and paste the following script in a Notepad window and save its as productkey.vbs by choosing the “All Files” option in “Save as type”.

Set WshShell = CreateObject("WScript.Shell")
MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"))
Function ConvertToKey(Key)
Const KeyOffset = 52
i = 28
Cur = 0
x = 14
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 saving this file, just click on it and a new popup window will show your Windows product key. You can copy or note this down somewhere to use it later.

How to recover Windows product key using Command Prompt?

This method to recover Windows product key is very simple. All you need to do is fire up a Windows Command Prompt window with administrative purposes. To do this, search for cmd in Windows search bar and right-click to choose the elevated permissions option.

Now, type the following command in Command Prompt and hit Enter:

wmic path softwarelicensingservice get OA3xOriginalProductKey

This step will promptly show your Windows key. Note that this method also works for OEC and Retail licenses.

How to find Windows License key using PowerShell?

To get back Windows serial key using Windows PowerShell, you need to open a new PowerShell with administrative permissions. Now, type the following commands and press Enter:

powershell “(Get-WmiObject -query ‘select * from SoftwareLicensingService’).OA3xOriginalProductKey”

This method will now promptly show you your Windows 10, 8.1, or 7 product key.

If these methods don’t solve your problem, you need to contact Microsoft Support or your OEM for Windows activation. You can also use some third-party software to recover your license key. If you’ve got the Windows key, but you need a Windows installation media, feel free to visit our ‘legal’ Windows download guide.

Did you find this article helpful? Don’t forget to drop your feedback in the comments section below.


View user profile

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum