Credit - Whitz for his original post... 

> This is an update to his article using latest RecoverKeys version 8.03.113 .

**RecoverKeys is a paid product and can be purchased here:** 

There are two versions available, 64 bit Enterprise or 32 bit Enterprise version that come with a command line utility.

You can use the paid enterprise version of recover keys to retrieve any supported license keys.  The vb script available will upload an HTML file listing all of the keys retrieved from a system as well as write them to the registry so they can be retrieved with a custom inventory rule. 

You will first need to install the program on your local system to obtain the file dependencies needed for the script to run successfully.  

  -  Make note of default install location 

 - Accept administrative changes being made to your system


Ø  -  Local computer scan will show what we can access from your machine…


Ø  When you buy your Enterprise license, open “Order Me” icon… and enter your license key.

Ø   -  Local scan reports all keys except for some KMS/MAK “hidden” keys. (See web site for support issues.)

Ø   - Most of the files needed will be found in the installation directory (default is c:\program files (x86)\recover keys).  

The files needed are: 

  1. English.xml (found in the Lang directory)

  2. RecoverKeysCmd.exe  

  3. Licensekeys_rk23.vbs

Download .vbs here: (

Ø  We will configure an offline k-script as shown below to run the program and gather our keys.



Ø  Configure your script as an Offline Kscript.  Configure the tasks as shown above.  The parameters section for steps 1, 3, and 4 are below so you can copy and paste. 

1  -scanlocal -HTML -hideheader -key:YOURKEYHERE -FILE:"$(KACE_DEPENDENCY_DIR)\rk.html"

3  -scanlocal -TSF  -hideheader  -key:YOURKEYHERE -FILE:"$(KACE_DEPENDENCY_DIR)\rktab.txt"

4  "$(KACE_DEPENDENCY_DIR)\licensekeys_rk23.vbs" "/path:$(KACE_DEPENDENCY_DIR)\rktab.txt"

Ø  Once this is configured save all the changes then save the script itself.  You can now choose machines to run the script on whatever schedule you wish. 

The VBS file in the script will write the keys to the registry so they can be added to the inventory with a custom inventory rule.  Once they are part of the inventory you can report against those fields.

Ø  To create a record with a custom inventory rule, go to Inventory > Software.  Click the Choose Action drop down and choose add new item.

 Name the record and then fill in the custom inventory rule section.  We will be  using "RegistryValueReturn" for this instance.  The keys will be stored in one of two places. 

On 64-bit systems it will be "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\kace\Software Licenses All". 

On 32-bit sytems it will be "HKEY_LOCAL_MACHINE\SOFTWARE\kace\Software Licenses All"

 Here is an example custom inventory rule:

"RegistryValueReturn(HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\kace\Software Licenses All, Windows 7 Enterprise  License Key, REG_SZ)"


 This will return the “Windows 7 Enterprise key” under the custom inventory rules section of the systems inventory.  

*** You can create multiple inventory rules to pull in the software key items of your choice.  


Command line syntax: