The syntax of a regular expression rule varies slightly from the other File rules. The fullpath argument is a string that matches the absolute path to the file location, but does not include name of the file. The filename is specified as a separate argument using a regular expression.
The following table provides a list of rules that allow you to use regular expressions.
For rule syntax and usage, see the tables in Checking for conditions (conditional rules), Getting values from a device (Custom Inventory Field), and Matching filenames to regular expressions.
path and fullpath are strings that specify the absolute path to a directory or file on the device. For example:
The KACE Agent locates the directory or file and performs the specific test.
registryPath is a string that specifies the absolute path in the registry to a registry key. For example:
version is an integer (type is TEXT) that the KACE Agent compares to the version of the item being tested on the device.
For example, the FileVersionGreaterThan test returns ‘true’ if the value you specify is higher than the version number of the file or folder and otherwise returns ‘false’.
To test a range, join a Less Than and Greater Than rule as follows:
var is a string that matches the actual name of the environment variable on the device.
For example, to test that the Program Files directory variable is correctly set:
attribute is a system property, a file or folder property, or a KACE Agent-assigned property on the device. The appliance provides operating system-dependent argument types.
You can use the FileInfoGreaterThan, FileInfoLessThan, and FileInfoEquals functions to test a file property on Windows in the following syntax:
The following table shows the attributes supported by Windows:
On Linux and Mac devices you can use the following arguments to test file attributes:
The identification number of the device (disk) containing the file | ||
type identifies the type of data you are testing or returning.
The KACE Agent supports the following types:
• |
TEXT is a string. Only valid for exactly matching in conditional rules such as Equals. In ValueReturn rules, this sets the Custom Inventory Field type to string and therefore limits search criteria and filtering to matching operators. |
• |
NUMBER is an integer. Valid in all conditional rules, this allows you to specify a whole number for comparison. |
• |
DATE must be in the format of MM/dd/yyyy HH:mm:ss. For example:09/28/2006 05:03:51. Time is required. For example, in a comparison such as greater than, you must at least specify the time as 00:00:00. |
value typically follows type except in a rule where the datatype is known, such as in a version rule. The value you specify must match the type. See Specifying the datatype.
valueName is a string that matches the name of the registry entry you want to test. Used only in registry tests for Windows devices.
entry is either NUMBER, TEXT, or DATE and matches a key in a PLIST file on a Mac OS X device. If the wanted key is contained in an array/dictionary within the PLIST file, it can be referenced by specifying the name/integer for the array/dictionary, using a delineating colon, and then the name/integer of the key (dictionary:key) in the entry argument.
• |
A key, Item 0, within an array, PackageGroups, is referenced by using PackageGroups:0 for the argument |
• |
A key, contentType, within the dictionary, Item 102, is referenced by using 102:contentType for the argument. |
regex is a regular expressions that matches a filename in a Conditional or Value Return rule. See Matching filenames to regular expressions for more details.
The shell command functions allow you to specify the command you want to run on the device. The guidelines for writing rule arguments do not apply to commands. However, white space after the opening parenthesis, and immediately before the closing parenthesis, is stripped from the command.
2. |
You can deploy packages to managed devices to install software remotely using the appliance.
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Conditions d’utilisation Confidentialité Cookie Preference Center