You can write Custom Inventory rules that identify whether (true/false) an application is installed.
When using a conditional rule, if the rule returns true, the Display name (Title) of the custom application appears in the Software: Installed Programs section of the Device Detail page in the Inventory section.
The following sections describe the rules that test for conditions:
When the rule returns false, the application does not appear in the Installed Programs section in the device’s inventory details.
TIP: You can view a list of devices that have the item installed on the Inventory > Custom Inventory > Custom_item: Detail page. |
The following table describes which data types can be used for comparison.
Data types supported for comparison functions Equals, GreaterThan, LessThan | |
The following table describes how comparisons are made.
For example, if the target value is 52a1, only 52 is evaluated. | |
For information on Equals, GreaterThan, and LessThan for FilenamesMatchingRegex, see Regular Expression Rule Reference.
Rules whose name ends with Exists check for the presence of a file, directory, registry key, or other item. If the KACE Agent locates the item on the device, the rule returns true, and the item appears in the device’s Inventory Details as an Installed Program.
Use any of the following Exists rules:
Example: Check for a directory (folder)
The following example tests whether the Windows directory exists on the device:
Rules whose name ends with Equals compare the value set on the device to the value you specify in the rule. The rules return true if the values exactly match.
Rules that use arguments with set data types can only compare values of the same type.
Use any of the following Equals rules:
Example: Testing JAVA_HOME setting
To verify that the JAVA_HOME setting is C:\Program Files\Java\jdk1.6.0_02:
Example: Testing McAfee® Registry Entry setting
To check the setting use the same format as the date in the entry:
Example: Detecting Windows 7 Service Pack 1
Windows 7 Service Pack 1 appears in Add/Remove programs for devices that were originally on Windows 7 then upgraded to SP1 only. The default application inventory for this item does not reflect devices that are already on SP1 because they were originally imaged at the SP1 level.
Functions whose names end with GreaterThan and LessThan compare values as listed in Table 24.
Use any of the following Greater Than and Less Than rules:
• |
FileVersionGreaterThan (path, version) and FileVersionLessThan (path, version) |
• |
ProductVersionGreaterThan (path, version) and ProductVersionLessThan (path, version) |
• |
FileInfoGreaterThan (fullpath, attribute, type, value) and FileInfoLessThan (fullpath, attribute, type, value) |
• |
RegistryValueGreaterThan (registryPath, valueName, value) and RegistryValueLessThan (registryPath, valueName, value) |
• |
EnvironmentalVariableGreaterThan (var, type, value) and EnvironmentalVariableLessThan (var, type, value) |
• |
PlistValueGreaterThan (fullpath, entry, type, value) and PlistValueLessThan (fullpath, entry, type, value) |
• |
FilenameMatchingRegexGreaterThan (fullpath, regex, value) and FilenameMatchingRegexLessThan (fullpath, regex, value) |
Example: Testing whether the product version is higher
To verify that the product version is higher than a given number:
To verify that the production version is a given number or higher, enter the following:
Example: Testing for a product version range
To test whether the product version is within a range, combine less than and greater than rules:
You can join rules using AND operators or OR operators to test for multiple conditions.
Joining conditional rules produces the following results:
In the Custom Inventory Field, join rules using the following syntax:
Separate the conditional statements from the operator with spaces.
Example: Checking for a registry key and comparing values
When you join rules using the OR operator, if any of the rules in the Custom Inventory Field are true, the application appears in the Installed Program list of the device.
In the Custom Inventory Field, join the rules using the following syntax:
Separate the function statements and operator using a space.
Example: Checking for either registry value
To check that a registry entry is one value or another:
TIP: To specify a range use RegistryValueGreaterThan and RegistryValueLessThan rules joined by the AND operator. |
The rules that end with ValueReturn enable you to gather information from the device. You can use these rules to collect information that the KACE Agent normally does not collect.
The returned values are set with the custom application display name (Title). This appears on the Device Detail page under Software in Installed Programs and Custom Inventory Fields.
Use the Custom Inventory Field values to manage installations and to distribute software as well as reports, View By filtering, Smart Label search criteria, or any other process that can be performed with an automatically detected setting.
This section covers the following topics:
The following table shows all available value return rules that you can use to set a Custom Inventory Field :
You can set the Custom Inventory Field to any of the Windows File Information attributes using the FileInfoReturn rule.
Example: Getting Mozilla Firefox version
The following example sets the Custom Inventory Field for the Mozilla Firefox Product Version as a NUMBER:
In the Custom Inventory Field, enter the following:
You can set the Custom Inventory Field to a registry key using the RegistryValueReturn rule. Where the registryPath (on left) is the path to the entry, the valueName (on right) is the key you want to return.
Example: Getting the Mozilla FireFox CurrentVersion key
To set the CurrentVersion registry key as a Custom Inventory Field:
Command rules enable you to set the output of a command to a Custom Inventory Field. The command depends on the command interpreter and executable path on the device.
Use any of the following rules to set the output of the command to a Custom Inventory Field:
Example: Getting uptime on a Mac OS X
To set the uptime as a Custom Inventory Field:
PlistValueReturn rules enable you to set a Property List (PList) key as a Custom Inventory Field.
Example: Getting the system locale
Join ValueReturn rules using either the AND or OR operator. The rule shows the application as an Installed Program, if any of the values are not empty.
The joined values are all set in the same Custom Inventory Field separated by the operator and therefore are technically considered for the purposes of Search Criteria, filters, reports, and other appliance processes as TEXT.
ValueReturn rules joined by the:
• |
AND operator: All the values are reported in the Custom Inventory Field. |
• |
OR operator: All values are reported in the Custom Inventory Field. |
In the Custom Inventory field, join rules using the following syntax:
You can use regular expression syntax to match filenames.
The following table provides an overview of the regular expression syntax used to match filenames:
© ALL RIGHTS RESERVED. Feedback Termini di utilizzo Privacy Cookie Preference Center