• ×
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
  • ×
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
Guidelines
Are you having HotKey issues? Click here for tips and tricks.
Check out our WINDOWS 11 Support Center info about: OPTIMIZATION, KNOWN ISSUES, FAQs, VIDEOS AND MORE.
HP Recommended

Hi!

 

I have had a boot failure and need to find the product key/license. My laptop is an envy notebook with win 10 pro OS preinstalled. I was able to boot to a command prompt as administrator. I searched the registry via Regedit for productkey - no hits. I tried the command "wmic path software licensing service get 0a3xoriginalproductkey" and received an Error: Description = Not Found

 

Any suggestions for how I may find this information so I may reinstall the OS?

 

Tia,

John

1 REPLY 1
HP Recommended

@Mitch8,

 

Welcome to our HP Community forum!

 

Since your HP Envy laptop came with Windows 10 Pro preinstalled, the product key is almost certainly embedded in the BIOS/UEFI firmware.


That’s why you're not seeing it in the registry or getting a result from that WMIC command.

 

Here’s what you can try:

 

1. Use a Different Command:

 

In the command prompt (still as Administrator), copy/paste/enter:

 

wmic path softwarelicensingservice get OA3xOriginalProductKey

 

(Note: It’s “OA3x”, not “0a3x” — that’s a common typo. The letter "O", not zero.)

If successful, this will display your original embedded product key.


2. Alternative Way Using a Simple Script:

 

You can also quickly pull the key using a built-in PowerShell method:

 

  • At the admin command prompt, copy/paste/enter:

powershell "(Get-WmiObject -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey"
 

If a product key is stored in the BIOS, this should reveal it.


3. Important Notes:

 

  • You don't actually need the key manually if you reinstall Windows 10 Pro.
    When you reinstall Windows, it will automatically detect the key from the BIOS and activate Windows once you're online.

  • Just make sure you install the same edition (Windows 10 Pro).

 

If you're doing a clean reinstall, simply skip entering a key when asked during setup -Windows Setup will fetch the embedded key automatically during or after installation.

 

4. Bonus: Find the Product Key Instantly with a "Tiny Script":

 

If for whatever reason the previous methods failed, you can create a quick script that will guarantee to fetch your product key:

 

  1. Open Notepad.

  2. Copy and paste this code into Notepad -just as is:

 

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

 

 

3. Save the file as FindKey.vbs (important: save as "All Files", not ".txt").

4. Double-click the FindKey.vbs file, and a popup will display your Windows product key.

 

Kind Regards,

 

NonSequitur777

 


† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the <a href="https://www8.hp.com/us/en/terms-of-use.html" class="udrlinesmall">Terms of Use</a> and <a href="/t5/custom/page/page-id/hp.rulespage" class="udrlinesmall"> Rules of Participation</a>.