The K1000 inventory rules engine supports the following functions. Custom inventory rules are entered on the Inventory/Software/ Edit Software Detail page, in the "Custom Inventory ID (rule):" field.
File System Functions
The FileVersion* and ProductVersion* functions retrieve the information from the file described in the fullPath argument. This would match the values you would find by right clicking on the file in explorer and reviewing the Version tab.
- DirectoryExists(string dirName)
- FileExists(string fullPath)
- FileVersionEquals(string fullPath, string valueToTest)
- FileVersionLessThan(string fullPath, string valueToTest)
- FileVersionGreaterThan(string fullPath, string valueToTest)
- ProductVersionEquals(string fullPath, string valueToTest)
- ProductVersionLessThan(string fullPath, string valueToTest)
- ProductVersionGreaterThan(string fullPath, string valueToTest)
Registry Functions
- RegistryKeyExists(string absPath)
- RegistryValueEquals(string absPathToKey, string valueName, string valueToTest)
- RegistryValueLessThan(string absPathToKey, string valueName, string valueToTest)
- RegistryValueGreaterThan(string absPathToKey, string valueName, string valueToTest)
Example:
RegistryValueEquals(SOFTWARE\Microsoft\Internet Explorer\Version Vector,IE,6.000)
Constraints:
If the results of functions in the form described above evaluate to true, then it is assumed that the software is installed on the target machine, and there is no reason to install this package again. And, a corresponding copy of the software is counted in the K1000 appliance database.
Functions of the form *VersionGreaterThan and *VersionLessThan will attempt to do valid comparisons of version information. Only numeric versions can be compared. For example 1.2.3B would not compare correctly. The following would all behave normally:
- 1.2.3 < 1.2.4
- 1.2.3 < 2.4
- 1.2.3 > .9.1.9
- 1 < 1.5
- 1.0.0.0.5 < 1.1
Functions of the form *Equals will be doing string comparisons, so the supplied valueToTest values must match exactly.
- "1.0" does not equal "1.0.0.0"
- ".9" does not equal "0.90"
For related information about creating Custom Data Fields, see the following FAQ-article:
http://www.kace.com/support/resources/kb/article/What-are-the-steps-to-create-a-custom-data-field-Inventory