**RecoverKeys is a paid product and can be purchased here: http://recover-keys.com/en/order.html**
You can use the paid enterprise version of recover keys to retrieve any supported license keys. The script 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 get the file dependencies needed for the script to run successfully.
Most of the files needed will be found in the installation directory (default is c:\program files (x86)\recover keys). The files needed are:
- English.xml (found in the Lang directory)
- Licensekeys_rk23.vbs (link to download: https://docs.google.com/open?id=0BxH6X8H1Q3CRYUZRSTZveUZDTlk)
We will configure a 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)"
That will return the key under the custom inventory rules section of the systems inventory. You can create multiple inventory rules to pull in the software items of your choice.
Command line syntax: http://recover-keys.com/kb/command-line-version.html