Appendix B: Rules

<antivirusTest>

Check whether or not antivirus is set up and running. Only available on Windows platform

property

default value

allowed values

description

product

any

any, windows_defender

Product to test, or any product

type

enabled

enabled, disabled

Type of test

Common properties:

negate

<checkFreeDiskSpace>

Check whether or not enough free disk space is available

property

default value

allowed values

description

logic

equals

equals, does_not_equal, greater_or_equal, greater, less, less_or_equal

Comparison type

path

string

Path to the folder or disk

size

0

positive integer or zero

Size of free disk space to check for

units

KB

KB, MB, GB

Size units for the checked value.

Common properties:

negate

<compareText>

Compare a text with a value.

property

default value

allowed values

description

logic

equals

equals, contains, does_not_contain, does_not_equal, starts_with, ends_with

Comparison type

nocase

0

0, 1

Case insensitive comparison

text

string

Text

value

string

Value

Common properties:

negate

<compareTextLength>

Compare the length of a text.

property

default value

allowed values

description

length

string

Length to compare with

logic

equals

equals, does_not_equal, greater_or_equal, greater, less, less_or_equal

Comparison type

text

string

Text to compare the length of

Common properties:

negate

<compareValues>

Compare two values with each other.

property

default value

allowed values

description

logic

equals

equals, does_not_equal, greater_or_equal, greater, less, less_or_equal

Comparison type

value1

string

First comparison operand

value2

string

Second comparison operand

Common properties:

negate

<compareVersions>

Compare two versions.

property

default value

allowed values

description

logic

equals

equals, does_not_equal, greater, greater_or_equal, less, less_or_equal

Test type

version1

string

First comparison operand

version2

string

Second comparison operand

Common properties:

negate

<componentTest>

Perform check on a given component.

property

default value

allowed values

description

checkParentComponents

0

0, 1

Whether to also perform check on all parent components

logic

exists

exists, does_not_exist, selected, not_selected, hidden, visible, editable, not_editable

Comparison type

name

string

Name of the component

Common properties:

negate

<fileContentTest>

Check whether a file contains or does not contain a text.

property

default value

allowed values

description

encoding

iso8859-1

iso8859-1, iso8859-2, utf-8, cp1251, cp1252, ascii, macRoman, unicode, binary

Encoding of the text file

logic

contains

contains, does_not_contain

Test type

path

string

Path to file that contains text for comparison

text

string

Text to compare with

Common properties:

negate

<fileExists>

Check for the existence of a given directory or file.

property

default value

allowed values

description

path

string

File or directory path for the test, accepts wildcards.

Common properties:

negate

<fileIsLocked>

Check if file is locked.

property

default value

allowed values

description

path

string

File or directory path to check

Common properties:

negate

<fileTest>

Perform test on a given directory or file.

property

default value

allowed values

description

condition

exists

exists, not_exists, writable, not_writable, readable, not_readable, executable, not_executable, is_directory, is_not_directory, is_symlink, is_not_symlink, is_file, is_not_file, is_empty, is_not_empty

Specifies the requirement to test over the given file

path

string

File or directory path for the test

Common properties:

negate

<firewallTest>

Check whether or not a firewall is set up and running. Only available on Windows platform

property

default value

allowed values

description

type

enabled

enabled, disabled

Type of test

Common properties:

negate

<hostValidation>

Validates whether or not a given hostname or IP address meets the given condition

property

default value

allowed values

description

condition

is_valid

is_valid, is_not_valid

A valid host is one that can be resolved to an IP address and a valid IP is one that is syntactically correct

host

string

Hostname or IP address to be checked

type

any

ip, ipv6, hostname, any

Type of host specification

Common properties:

negate

<iniFileTest>

Perform tests over an ini file.

property

default value

allowed values

description

key

string

Ini key name

logic

exists

exists, does_not_exist, equals, does_not_equal, contains, does_not_contain

Comparison type

path

string

Ini file path

section

string

Ini section name

value

string

Ini key value

Common properties:

negate

<isFalse>

The rule returns false if value is one of 1, yes or true. Otherwise it evaluates to true.

property

default value

allowed values

description

value

string

String to test if it is false

Common properties:

negate

<isTrue>

The rule returns true if value is one of 1, yes or true. Otherwise it evaluates to false.

property

default value

allowed values

description

value

string

String to test if it is true

Common properties:

negate

<osxServiceTest>

Check whether or not a service exists and whether or not it is running. Checking if service exists requires Mac OS X version 10.4 or later. Checking if service is running requires Mac OS X 10.5 or later.

property

default value

allowed values

description

condition

exists

exists, not_exists, is_running, is_not_running

Condition to test for

service

string

Name of service

Common properties:

negate

<platformTest>

Compare the system platform with a given platform name.

property

default value

allowed values

description

type

linux

aix, freebsd, freebsd4, freebsd6, freebsd6-x64, freebsd7, freebsd7-x64, hpux, hpux-ia64, hpux-parisc, irix-n32, linux, linux-arm32, linux-arm64, linux-ia64, linux-ppc, linux-s390, linux-s390x, linux-x64, linux-x86, openbsd, openbsd3, osx, osx-arm64, osx-intel, osx-ppc, osx-x86_64, solaris, solaris-intel, solaris-sparc, unix, windows, windows-10, windows-11, windows-2000, windows-2003, windows-2008, windows-2008-r2, windows-2012, windows-2012-r2, windows-2016, windows-2019, windows-2022, windows-7, windows-8, windows-8.1, windows-9x, windows-nt, windows-vista, windows-x64, windows-x86, windows-xp

Type of platform to test for

Common properties:

negate

<portTest>

Allows you to test whether a port is free in the local machine.

property

default value

allowed values

description

condition

can_bind

can_bind, cannot_bind

Condition to test for

port

string

A port number

Common properties:

negate

<processTest>

Check if a particular process exists in the system. Currently only supported in Windows, Linux, OS X.

property

default value

allowed values

description

logic

is_running

is_running, is_not_running

Check whether or not the process is running.

name

string

Exact process name that will be checked.

Common properties:

negate

<programTest>

Check whether or not a program can be found in the system path.

property

default value

allowed values

description

condition

is_in_path

is_in_path, is_not_in_path

Condition to test for

name

string

Program name

Common properties:

negate

<propertiesFileTest>

Perform tests over a properties file.

property

default value

allowed values

description

key

string

Key name

logic

exists

exists, does_not_exist, equals, does_not_equal, contains, does_not_contain

Comparison type

path

string

Properties file path

value

string

Key value

Common properties:

negate

<regExMatch>

Compare a text with a regular expression.

property

default value

allowed values

description

logic

matches

matches, does_not_match

Whether or not the rule will apply if the regular expression matches.

pattern

string

Regular expression

text

string

Text

Common properties:

negate

<registryTest>

Perform tests over a registry entry. You can provide either a key or a key and a name

property

default value

allowed values

description

key

string

Registry key

logic

exists

exists, does_not_exist, is_empty, is_not_empty, is_type, is_not_type

Comparison type

name

string

Entry name to test for existence

type

REG_SZ

REG_BINARY, REG_NONE, REG_SZ, REG_EXPAND_SZ, REG_DWORD, REG_BIG_ENDIAN, REG_LINK, REG_MULTI_SZ, REG_RESOURCE_LIST

Type of the key to check with the is_type or is_not_type logic

wowMode

none

none, 32, 64

Determines whether we want to access a 32-bit or 64-bit view of the Registry

Common properties:

negate

<resourceLimitTest>

Check if resource limit matches requirements.

property

default value

allowed values

description

limitType

hard

hard, soft

Limit type

logic

less

equals, does_not_equal, greater_or_equal, greater, less, less_or_equal, is_unlimited, is_not_unlimited

Comparison type

type

open_files

core_file_size, data_seg_size, file_size, max_locked_memory, max_memory_size, open_files, pipe_size, stack_size, cpu_time, max_user_processes, virtual_memory

Resource Type To Check

value

0

string

Value

Common properties:

negate

<ruleGroup>

Group a set of rules.

property

default value

allowed values

description

ruleEvaluationLogic

and

and, or

Rule evaluation logic

ruleList

<rule>

List of rules to be grouped

Common properties:

negate

<singleInstanceCheck>

Check if there is another instance of the installer being executed.

property

default value

allowed values

description

logic

is_running

is_running, is_not_running

Condition to check.

Common properties:

negate

<stringTest>

Check the string type

property

default value

allowed values

description

text

string

Text

type

ascii

ascii, digit, alphanumeric, empty, not_ascii, not_digit, not_alphanumeric, not_empty

Type of string

Common properties:

negate

<userTest>

Check if a particular user exists in the system or has a valid password.

property

default value

allowed values

description

logic

exists

exists, not_exists, valid_password, invalid_password, is_windows_admin_account, is_windows_user_account, is_windows_guest_account

Specifies the requirement to test over the given username.

password

string

If test logic is set to verify the password, the password to be checked. Currently only available on the Windows platform

username

string

User name that will be checked. In the case of using Windows domains, it needs to be specified in the form username@DOMAIN

Common properties:

negate

<windowsAccountTest>

Check whether or not a specified account has proper rights

property

default value

allowed values

description

account

string

User or group name to check; if account does not exist, rule always returns false

rights

string

Account rights to test for, separated by spaces; Example value: SeServiceLogonRight. A complete list can be obtained from http://msdn.microsoft.com/en-us/library/aa375728(v=VS.85).aspx

Common properties:

negate

<windowsServiceTest>

Check whether a service exists and whether is running

property

default value

allowed values

description

condition

exists

exists, not_exists, is_running, is_not_running

Condition to test for

service

string

Name of service

Common properties:

negate

<rule> - Common Properties

property

default value

allowed values

description

negate

0

0, 1

Negate the rule result. This property does not allow variables.