How-To Geek
How to Find Your Lost Windows or Office Product Keys
If you’re planning on doing a reinstall of Windows but can’t find your product key, you’re in luck because it’s stored in the Windows Registry… it’s just not easy to find, and it’s impossible to read without some help. Luckily, we’re here to help.
As you can see in the screenshot above, the product ID is stored in the registry but is in a binary format that can’t be read by humans unless you are some sort of Cylon. You aren’t, are you?
We’re not really sure why Microsoft went to great lengths to make it difficult to see the product keys for their software, especially since they are stored right in there in the registry and can be read by software, if not by humans. We can only assume that they don’t want anybody to re-use a key from an old computer.
The great thing is that you can even recover a key from a computer that won’t boot anymore. All you need is access to the disk drive from a working computer. Keep reading for more.
Note: the NirSoft keyfinder won’t always work for OEM computers, depending on how they decided to activate the licenses they might have used a single license for all computers. It also doesn’t work for Office 2013.
Three Places You Might Find the Key
The key you need will be in one of three places:
- Stored in software on your PC: When you (or your PC manufacturer) installs Windows, Windows stores its product key in the registry. You can extract this product key, and — often — enter it when reinstalling Windows on your PC. Crucially, you’ll need to grab it from your operating system before you begin reinstalling Windows or it could be deleted if you format your hard drive.
- Printed on a sticker: Some PCs use a technology called “System Locked Pre-installation,” or SLP. If your PC uses this, the product key on your PC — the one stored in the registry, and the one key-viewer applications display — will be different from the actual key your PC needs. The actual key is on a certificate of authenticity (COA) sticker on your PC or its power supply. The one in the registry and key-viewer application is a red herring. This system was common for Windows 7 PCs.
- Embedded in your PC’s UEFI firmware: Many newer PCs that come with Windows 8 use a new method. The key for the version of Windows the PC comes with is stored in the computer’s UEFI firmware or BIOS. You don’t even need to know it — assuming you’re installing the same edition of Windows the PC came with, it should automatically activate and work without you needing to enter a key. It’ll all happen automatically.
Be sure to use the same version and edition of Windows the computer came with. In other words, if it came with Windows 7 Home Premium, you can’t install Windows 7 Professional.
Finding the Windows Key Without Any Software (Advanced Users Only)
Assuming you can boot your computer without any problems, you can easily create a simple VBscript that will read the value out of the registry and then translate it into the format that you need for reinstalling. We’re not sure where this script came from, but reader raphoenix posted it on our forum a long time ago, so we’re sharing it here for you.
Copy and paste the following into a Notepad window:
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
You’ll need to use File -> Save As, change the “Save as type” to “All Files” and then name it productkey.vbs or something similar ending with the vbs extension. We’d recommend saving to the desktop for easy access.
Once you’ve saved it, you can just double-click and the popup window will show you your product key.
Protip: If you use CTRL + C when the popup window is active, it will copy the contents of the window to the clipboard, and then you can paste it into Notepad or somewhere else.
Use NirSoft’s ProduKey to Recover Product Keys (Even if You Can’t Boot the PC)
The easiest way to get access to your product key is with a third-party utility, and there’s nobody better at those than NirSoft. Their utilities are always crapware-free, and are always really useful. The only issue with this particular utility is that some antivirus will detect it as a false positive, because some malware might try to steal your product key.
Note: if your OEM installed your computer and used a single key for all their PCs, this key might not actually work to reinstall your computer. Keep reading for more information.
All you have to do is download ProduKey, unzip it, and then run it to immediately see all of your product keys. It’s as simple as that.
If you want to recover a key from a dead computer, you can hook up the hard drive to a working PC, and then run ProduKey and use File -> Select Source to point to the external Windows directory. You can then grab the keys from that computer easily.
You can also use a Linux live CD to pull the Windows directory off the other computer and onto a thumb drive, or just grab the registry files if you prefer. If you need help, we’ve got a guide to pulling data off a dead computer.
Read the Key From the COA Sticker
So, is that product key usable for reinstalling Windows on your PC? If you have a Windows 7-era PC, there’s a good chance the PC’s key is a single key the manufacturer uses for all their PCs. Thanks to “System Locked Pre-installation,” you’re not allowed to use that key to install Windows. If you try, you’ll get error messages about the key being invalid.
To check, you’ll need to look for a certificate of authenticity sticker on your computer. The COA sticker verifies that the computer came with an authentic copy of Windows, and that sticker has a product key printed on it. You’ll need that product key to reinstall Windows — and, if the manufacturer used System Locked Pre-installation, that key is different from the one your PC came with in software.
Examine your computer to find the key. On a laptop, it may be on the bottom of the laptop. If your laptop has a removable battery, it may be under the battery. If there’s some sort of compartment you can open, it might be in there. It may even be stuck to the laptop’s charger brick. If it’s a desktop, look on the side of the desktop’s case. If it’s not there, check the top, back, bottom, and anywhere else it might be.
If the key has rubbed off of the sticker, there’s not much you can do. You can try contacting your computer’s manufacturer and explaining what happened, but we can’t guarantee they’ll help. Microsoft would always be happy to sell you another key, though!
Is the Key Stored in Hardware?
Newer Windows 8 PCs can avoid all these problems. The key isn’t stored in software where it can be wiped, or on a sticker where it could be smudged off or removed. No one can glance at your computer’s COA sticker to steal its product key. Instead, the key is stored in the computer’s UEFI firmware or BIOS by the manufacturer.
You don’t have to do anything special if you have this. If your computer came with Windows 8 and it doesn’t have a COA sticker, don’t worry. You should just be able to reinstall the same edition of Windows the PC came with and it should just work without even asking you for a key. (Still, it may be best to run NirSoft’s ProduKey and write down any key you find there before reinstalling Windows — just in case.)
The product key system is complicated to understand because Microsoft doesn’t really want typical Windows users to reinstall Windows on their PCs. Instead, they’d rather you use your computer manufacturer’s recovery media. But the recovery media is full of the bloatware you don’t want on your PC — that’s why so many geeks often opt to reinstall Windows on their new PCs.
- Published 12/30/14
I'm puzzled. I copied and pasted the code provided to get my product key and compared it to the one I had stored and they don't match.
I am running Win7 64 bit. I ran this code and verified with NirSoft ProduKey that the Product Key for Windows matches.
Yeah, I just went and double-checked again, and the code that I got from both solutions matched the original installation key.
Prodkey is probably the easiest/best solution for this. Cool to have a script too...but if you have a flash drive just keep the Nirsoft and Sysinternals suites on them. Plenty of other very useful tools to have on the fly.
Good ideas - I do it the old fashioned way - I record them and email them to myself and store them that way. I also hold them in a Lastpass vault.
The free Belarc Advisor give you the same information.
Just a note regarding Prodkey -
As with many of NirSoft's little programs, Malwarebytes Antimalware will view the ProduKey.exe program as a "PuP" -- which will prevent it from running and move it into the quarantine list.
Simply restoring the file does nothing, as MBAM will flag it again the next time you try to run it. You need to add the ProduKey.exe file to MBAM's Exclusions List - after which, it will run normally and work as intended.
Belarc Advisor cannot find MS Office 2013 Product Key, neither can Nirsoft. Does this method work for MSO2013? Not tried on one of my computers that has MSO2013 installed.
As presented, this utility only extracts your Windows Product Key. The other utilities bandied about can extract others, this one does not.
Well the script only extracts the Windows product key. The NirSoft utility will grab other keys if possible.
I'm researching the Office 2013 key situation, because it looks like most of them don't support that, which is unfortunate. I should have tested further before adding "Office" to the title of the article.
I use Belarc Advisor. It finds all product keys on the system and a lot more useful information about the system.
But be aware that when your OS is an OEM version, then the product key any keyfinder finds for the OS is pretty useless. In that case you have to use the key from the COA sticker which is on the back of a desktop and on the bottom or in the battery compartment of a laptop and looks like this:
Thanks, I updated the article to mention that.
Belarc Adviser (free) latest version (and possibly some earlier versions) will find Windows 8 and 8.1 keys as does Produkey. However, none of them will find the Office 2013 key because it doesn't exist. The installer only saves the last five characters of the key into the registry. Microsoft tells us about it here but they have stuffed up slightly because they don't tell you about 64 bit Office on a 64 bit machine. You use the same procedure as for a 32 bit machine.
I have written a small batch file (.BAT) which will do the job. Just key it into a text editor and save it as YourFileName.BAT and run it.
@echo off cls echo Batch file to show last 5 characters of Office 2013 activation keys echo. echo Bob D 2014/11/30 echo. REM Bob D 2014 11 30 V1.0 If exist "%ProgramFiles%\Microsoft Office\Office15\OSPP.VBS" goto NATIVE If exist "%ProgramFiles(x86)%\Microsoft Office\Office15\OSPP.VBS" goto HYBRID echo Unable to find Microsoft Office 2013 on this machine Pause exit :NATIVE REM 32 bit Office 2013 on a 32 bit Windows or REM 64 bit Office 2013 on 64 bit Windows %HOMEDRIVE% CD "%ProgramFiles%\Microsoft Office\Office15" cscript OSPP.VBS /dstatus pause exit :HYBRID REM 32 bit Office 2013 on 64 bit Windows %HOMEDRIVE% CD "%ProgramFiles(x86)%\Microsoft Office\Office15" cscript OSPP.VBS /dstatus pause exitYou are welcome......
Fabulous piece of software. Thank you for indicating it. And thanks for the 'be aware' note. Now I understand the discrepancy mentioned in my post above
In the above program I use several variables that are provided by Windows so that the program works under all circumstances. These are the words enclosed in the percent % % marks. If you want to find the actual content of the variables FOR YOUR MACHINE just open a command window and type SET and enter. You will find a long list of variables. Just look up what you want. You can filter the output by using the first (or more) characters of your variable. Example SET P or SET H. Capitals unnecessary, they are provided for clarity.
I have tried the VBS script as presented in the article and it doesn't work for me. Produkey works OK.
I have Windows 8.1 pro 64 bit retail but the key is actually Windows 8 which I bought from Microsoft when Win 8 first came out. The script runs but presents what looks like a key but is not what is in use. There is no confusion about keys as I keep a file with them all recorded. I am a bit puzzled. I'll try some more and get back.edit:I tried several of my machines and I couldn't get a good result. One I tried was Windows 8.1 64 bit OEM. Produkey was correct but the VBS script didn't produce the correct answer. Help.
I ran both the vbs script file and the product ProduKey as described in your article “How to Find Lost Windows ..” andgot different product keys for my Windows 8 PC. The results of the ProduKey matched my Windows 8 (original config) but I have since updated to Windows 8.1. The results seem consistent with the rest of the discussions. I think the program ProduKey is good however I support the belief that Belarc does a better job giving you more information. I recommend that all my clients use this to get a good overview of their computer for insurance purposes; run Belarc and save print and digital copies.
This will give the Correct Windows Key for embed EFI Bios machines.
https://app.box.com/s/l1vh4j2gevbcfgafdct7
The down load is completely clean as of right now.
I've used Advanced Tokens Manager with great success on many machines. Not only shows you your keys, but backs them up in such a way that you can activate immediately after reinstall w/o internet connectivity.
Cheers
The VBS script will show windows keys for versions up to and including Win 7 but MS changed the way win 8 stored its key in the registry and the script can no longer give the correct answer. I've checked back on earlier versions of Produkey and it did not give the correct output when first confronted with win 8. Great little script but no longer modern. Too bad; for this purpose I prefer a solution that won't or can't steal your keys.
Yep I found out after a lot of searching and wondering what the heck was going on only to find that this process only gives you the factory's mass install code not the owners code which has to be the sticker one. Why Microsoft in their wisdom found it necessary to let us consumers know this is a bit of a mystery to me because the code is of no earthly good to anyone as it would probably only be accessed by those who are into all that activation stuff.Bit disappointed too with the How to Geek article as I reckoned I had a way of finding the activation code for instances when the sticker is badly defaced or missing for an example.
Yeah that would be a problem. That's why one always should note the product key from the COA sticker when you unbox a new PC - especially laptops.
If you are need to recovery an Office Product Key prior to Office 2013, then you can use any one of several tools to extract it from the registry. Unfortunately, for Office 2013 MS "improved" how the product key is stored so that now users are forced to buy a new license if they don't have an external record of it. Here are some of the product key extraction tools I've tried in various environments:
NOTE: OEM (factory install andactivated) licenses use a different key than the one reported. Only the factory can use the PK from theoriginal factory activation. You would have been provided with a separate pieceof paper with a Product key for reactivation.
Belarc http://www.belarc.com/free_download.html - not only does Belarc extractproduct keys, it reports on a WHOLE BUNCH of other stuff you want to know.Printing the report, or saving it is probably a good idea.
Win 95-Win8, V8.4
NOTE: I tested version 8.4 on Windows8.0. It reported my Office 2003 2007 2010 product keys correctly. BUT for Office 2013 Pro Plus (localinstall) it did NOT report the key! Gosh Darn! It reported: 00215-95000-26121-AA381(Key: ends with G8YGX)f,g (the“ends with” is correct)
Superscripts fand g say:
f. The full product key is not stored on thiscomputer. However, the charactersshown uniquely identify your product key.
g. You can haveWindows save the full product key using the procedure at http://www.belarc.com/msproductkeys.html.
NOTE:The process described in the link in “g” is good for Office 365, and MAYBE (Ican’t confirm) online purchases of Office 2013. It does NOT work for Office2013 Pro Plus! (which I have )
License Crawler http://www.technibble.com/license-crawler-find-product-keys-in-the-registry/ 98 (Office 2003, 2007 , 2010 , Win Vista)
I tested V1.37.463 on Win 8.0 itreported Office 2010 correctly, did not report 2007 or 2003.
The “serial number” aka Product Keyreported for Office 2013 Pro Plus(local install) did NOT agree withmy documentation of key used!
SterJo SoftwareKey Finder. http://www.sterjosoft.com/list/ - Confirmed to work on XPthrough Win8, Office XP/2002 through 2010
Win XP to Win 8, Office XP to 2010.
I tested V 1.7 on Windows 8.0. Itreported my Office 2003 2007 2010 product keys correctly.
The “serial number” aka Product Keyreported for Office 2013 Pro Plus(local install) did NOT agree withmy documentation of key used!
Abelssoft MyKeyFinder - http://www.abelssoft.net/mykeyfinder.php -
I tested MyKeyFinder 2014 Free onWindows 8.0. It reported my Office 2003 2007 2010 product keys correctly.
The “serial number” aka Product Keyreported for Office 2013 Pro Plus(local install) did NOT agree withmy documentation of key used!
Sorry, I have not had opportunity (aka need) to test Win8and Office 2013 on these various tools:
Magical Jelly Bean http://www.magicaljellybean.com/ is free, supports 300+ programs V 2.0.8-Office 2003 OK, 2007 OK, 2010 na, Win Vista Wrong). They also have a paidRecovery Keys, support 4500+ programs
V 2.0.9.8
http://sourceforge.net/projects/keyfinder / - EnchantedKeyfinder Beta Portable- Win (9X, ME, NT/2K/XP, Vista, Win7), MS Office (97,XP, 2003, 2007, 2010), Recover key for 484 other software and counting
http://www.nirsoft.net/utils/product_cd_key_viewer.html Nirsoft ProduKeyV1.45- Office 2003 OK, 2007, 2010, Win Vista)
V1.62 Win 98 to Win 8. Office 2003-2010
ProduKey may beable to extract product key information from a registry file saved externally.This is useful if you’re trying to get the key details from the backup of a nowdefunct machine. Try the /Regfile option.
After installingon my system, I ran the program --> AS ADMINISTRATOR <-- and then clickedon File --> Select Source. Once in this menu it may appear a littleoverwhelming, don’t worry it’s not that complicated and your not going to breakanything else. Select the circle next to “Load the product keys from external SoftwareRegistry hive”. Now from here you may have to browse to a slightly differentlocation depending on where your windows.old folder is located, but you want tobasically browse to the following and open this file:
C:\Windows.old\Windows\System32\config\RegBack\SOFTWARE
After openingthis file select ok; you may have to wait a few minutes for it to load the hiveand give you your keys, but if they’re there you should see them and be able tofresh install your MS Office.
Please note thatthis did work for my Office 2007, it also gave me my Vista Home & PersonalKey, and Internet Explorer... lol! I hope this helps someone else too! Andremember backup before you do any upgrading/downgrading/or destruction to youPC.
http://www.winkeyfinder.com/download.php (Office 2003 , 2007 , 2010 , Win Vista )
V 1.73 final Win 98 to Win 7 (and more?) 32bit, Win XP to Win 7 64bit Office2000 to 2010 32&64-bit
http://www.recoverlostpassword.com/products/productkeyrecovery.html(trial) ProductKey Recovery 2007 2010 2013
NSAuditor Product Key Explorer http://www.nsauditor.com/product_key_finder.html Win XP to Win 8.1, Office 2003 to 2013
V3.6.3 Must buy to run. Free trial only shows partial key
I use magic jelly bean key finder.
https://www.magicaljellybean.com/keyfinder/
It will even pull the key off a non-bootable drive (just connect the drive with a SATA/IDE to USB adapter and load the "hive" off of it
Here is a free one for Office. I've used it to successfully retrieve Office 2013 keys after a re-image:
http://www.sterjosoft.com/key-finder.html