Creating custom inventory scans is a great function available to Tivoli Inventory. With a custom scan, almost any information stored on the workstation can be collected and stored in the Inventory tables.
Creating a custom scan is done with a couple simple steps
1. Determine the source for your data
2. Create a script to read the data and output the data in MIF format
3. Create a table in your database
4. Create inventory profile
As an example, I want a script that will read string data from any registry key I specify. I will also specify the file name to output the data to. This will allow for multiple registry keys to be collected at the same time.
1. Determine the source
The source for this data will be any string data in the registry. One assumption is that I am only going to scan HLKM.
2. The script I am using is in VBS format. Another assumption is that the target is Windows and the current versions of Windows already have Windows Scripting installed.
3. Create table in inventory
The line: MifFileOpen.WriteLine " NAME = ""REGISTRYDATA""" specifies the table name that is used.
MifFileOpen.WriteLine " NAME = ""REG_PATH"""
MifFileOpen.WriteLine " NAME = ""REG_VALUE"""
MifFileOpen.WriteLine " NAME = ""REG_DATA"""
specify the columns of the table.
On top of these columns, another column called COMPUTER_SYS_ID also needs to be created. This field is automatically filled in by Tivoli Inventory.
4. Create the Inventory Profile
Using a new or exiting profile, add the following to the Scripts and MIF files for PC
Enter a script name to be run before the scan:
cscript script_location\registrydata.vbs" "Software\Microsoft\Windows\CurrentVersion\Run" regrun1.mif
cscript script_location\registrydata.vbs" "Software\Microsoft\Windows\CurrentVersion\RunOnce" regrun2.mif
Enter the path and name of the custom MIF file to be read
Another step that can be added is using the dependencies with Tivoli to automatically download the script to the system. This can be done with the following
Create Depset script
After this is done, you will need to copy the VBS script to all the gateways so that it is available to the endpoint. If everything is in the right place you will see the vbs script appear on the workstation in the "%LCF_DATDIR%\..\..\inv\scan\registrydata directory.
Hope this helps