Capturing Windows Registry data in Inventory Database
Novell Cool Solutions: Trench
By Andrew Hill
Digg This -
Posted: 15 Jul 2004
Update: Andrew informs us that he has received so many enhancement requests for this popular tool, he has decided to place the source code in Novell Forge where other developers can roll up their sleeves and help make improvements. For the latest version, and to lend a hand yourself, see this Forge project. (Also available from a Forge Red Carpet channel.)
The purpose of this software is to allow capture of Windows registry data in the ZENworks for Desktops inventory database.
- zRegScan.exe must be copied to the C:\ZENworks directory of all workstations that you wish to scan.
- The runtime libraries included in this package may be deployed to the workstations, if they do not exist - these should all be placed in
- The registry keys that you wish to scan must be configured within the registry of each machine, as follows.
Create the following key:
Below this key, create a String Value named sequentially starting with "1" for each registry entry you wish to scan.
The format of each value is as follows:
<CIM Attribute Name>,<Hive: LocalMachine or CurrentUser>,<Registry Key Path>,<Registry Value Name>
1 = CostCenter,LocalMachine,Software\Corporate Settings,CostCenter
2.0 Configuring ZENworks Inventory
Within the Workstation Inventory policy, the following tasks must be completed.
- Enable custom scanning
- Specify zRegScan.exe as the Custom Scan Executable
- Click on the Custom Attribute Editor
- Add custom attributes as desired
Note: All custom attributes must be entered under the "Computer System Information" class.
Once these steps are completed, zRegScan.exe will be executed during normal inventory scans, and will create and populate the custom.ini file in the C:\ZENworks directory. This file will then be interrogated by the ZENworks inventory scanner and the values will be stored in the inventory database.
To verify that custom inventory information is in the database, right-click on one of the affected workstation objects in ConsoleOne, then choose Actions | Inventory. The custom attributes will be displayed under General | System Identification, as shown below.
The attributes will be updated each time the inventory scanner runs on the workstations.
This release has several limitations:
- There is very minimal error checking
- The ZENworks directory (where temporary inventory files are stored) must be on C:
- Registry items may only be scanned in HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER hives
- Fixed problem requiring local administrator rights. The key was being erroneously opened as all access instead of read-only.
- Fixed handling of non-existent and null values - the ZfD inventory scanner does not accept null values. Any non-existent or null value will be replaced with "N/A".
This tool is available for download from Novell Forge http://forge.novell.com/modules/xfmod/project/?zregscan.
If you have any questions you may contact Andrew at firstname.lastname@example.org
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com