How to Find a Windows 7 Product Key Using CMD

To find a Windows 7 product key with Command Prompt, open Command Prompt as administrator and run wmic path SoftwareLicensingService get OA3xOriginalProductKey. If a key is stored in your PC’s firmware, it appears on the next line. Be aware that most Windows 7 PCs don’t have one there. That feature arrived with Windows 8-era PCs, so on a Windows 7 machine your key is usually on the Certificate of Authenticity (COA) sticker on the case, under the battery, or on the original packaging.

Windows 7 has been unsupported since January 14, 2020, and no longer receives security updates.

Quick Answer

Admin Command Prompt > wmic path SoftwareLicensingService get OA3xOriginalProductKey. If it’s blank, check the COA sticker. Use slmgr /dli to see the last five characters of the installed key.

Check the Firmware Key

  1. Click Start, type cmd, right-click cmd.exe, and choose Run as administrator.
  2. Type wmic path SoftwareLicensingService get OA3xOriginalProductKey and press Enter.
  3. If a 25-character key appears, write it down. If the line under the heading is empty, your PC has no key in firmware.
Command Prompt showing a query for a product key stored in the PC firmware
A blank result is normal on most Windows 7 PCs.

See Part of the Installed Key

  1. In the same window, type slmgr /dli and press Enter.
  2. A dialog shows your edition, license status, and a Partial Product Key (the last five characters).
  3. Compare those characters with your sticker or records to confirm which key is installed.

Where Else Your Key Might Be

Source What to know
COA sticker On the tower, under a laptop or inside the battery bay. This is the key you’d use to reinstall.
Retail box or email receipt For copies bought separately
Registry (encoded) The installed key is stored in encoded form and needs a script or key-finder tool to read. On preinstalled PCs it’s often a generic manufacturer key, not the one on the sticker.
Organization’s IT For work PCs using volume licensing

Still using Windows 7? See how to turn off backup reminders in Windows 7 after setting up another backup.

Planning to move on from Windows 7? See upgrading from Windows 7 to Windows 10.

Troubleshooting

  • “wmic is not recognized”: Check spelling. WMIC is built into Windows 7, but it’s being removed from recent Windows 11 releases.
  • “Access denied”: Command Prompt isn’t running as administrator.
  • The sticker is worn: Contact the PC maker’s support with the serial number; they may be able to help.
  • Moving to a newer PC? Windows 11 needs its own license on most new hardware. To prepare an installer, see putting Windows 11 on USB.

Frequently Asked Questions

Can I see the full key with Command Prompt alone?

Only if it’s stored in firmware. Otherwise Command Prompt shows just the last five characters.

Can I use a Windows 7 key to activate Windows 10 or 11?

That free-upgrade path was never guaranteed and may not work now. Don’t count on it.

Is it safe to use key-finder tools?

Only download from the developer’s official site, and scan the file first. Many “key finder” downloads bundle unwanted software.

Summary

  1. Run the wmic query in an admin Command Prompt.
  2. If blank, check the COA sticker or purchase records.
  3. Use slmgr /dli to confirm the last five characters.
  4. Plan a move off Windows 7, which is unsupported.