How to Recover an Office Product Key From a Command Prompt

by James Dalton
Key image by Monika 3 Steps Ahead from

Microsoft Office requires a product key during activation as proof that a valid license is owned. This product key is encrypted in the system registry. If the product key is lost, it must be decrypted and extracted before it can be reinstalled. Numerous software packages can perform this task graphically. It may be desirable to develop a script that can extract this information using the Windows Command Prompt for reasons such as administrative efficiency or automation. Keyfinder, by James River Software, offers a Command Line version that can easily accomplish this task.

Use Keyfinder Command Line Version to Recover Office Product Keys

Step 1

Open the web browser and go to

Step 2

Click the "FREE Trial Download" button directly below the title.

Step 3

Save the "keyfinder.exe" file to a location on the local hard drive, such as C:\Temp.

Step 4

Open Windows Explorer by clicking the "Start" button, "All Programs," "Accessories" and then the Windows Explorer icon.

Step 5

In the left pane of Windows Explorer, click on the drive and folder where the "keyfinder.exe" file was saved.

Step 6

Double-click the "keyfinder.exe" file in the right pane to execute it.

Step 7

Click the "Next" button, check the box next to "I accept the terms of the license agreement" and click the "Install" button.

Step 8

Uncheck both boxes and click the "Finish" button.

Step 9

Open a Windows Command Prompt window by clicking the "Start" button, clicking "Run," typing "cmd" (without quotation marks) into the dialog box and clicking the "OK" button.

Step 10

Type in the following command, including the quotation marks: "C:\Program Files\Keyfinder Command Line (Trial Version)\keyfinder.exe"

The product keys for all installed Microsoft Office products, among others, will be displayed.


  • Extract product keys only for products that were installed using a valid license. Doing otherwise may be circumventing software licensing rules, or even breaking the law.


  • Only the first 10 characters of the product key will be displayed in the Keyfinder Command Line free trial version. Purchase a license for the full version to retrieve the entire product keys. The path in the provided command will have to be modified for the full version, to remove the "(Trial Version)" portion.
  • Other products that accomplish this same task graphically include RockXP and Recover Keys (see Resources for links).


Photo Credits

About the Author

Based on the east coast of Canada, James Dalton has been writing business and computer-related articles since 1995. He has achieved several information technology certifications, including being a Microsoft Certified Systems Engineer, along with numerous certificates in business domains. Dalton holds a Bachelor of Commerce in management information systems from McGill University.

More Articles