Variables

Purpose

Variables are used as containers for data which may change, based on how or where it is used.

Syntax

Variables have an extremely simple syntax, which is simply the name of the variable with a % on either end of it. If you need to use a % sign without calling a variable, you must escape the variable by using a second % sign, as in %%.

Usage

Every RuleKey is considered a variable. To create a named Variable is a matter of creating a new RuleKey. Once created, you can set the value of that Variable, reference other Variables, or use Functions in the Variable. As with Functions, Variables are expanded as they are needed from the innermost location to the outside. See the Functions page for an example of how Variables and Functions can be used together.

Built In Variables

The following variables have been built into the product. Variables can be accessed by specifying %VariableName%. They will be automatically substituted anywhere they are needed and evaluated, as appropriate. If a percent sign is needed and the data is going to be parsed, you will need to 'escape' it by adding another percent sign. ie: To specify 90% in the text, you will need to specify it as: 90%%.

Variable Name Description
C Comma. ie: ,
Computer HostName of the computer being audited
CP Closing parentheses. ie: )
CR Carriage return. ie: \r
NL Windows newline. ie: \r\n
OP Opening parentheses. ie: )
Q Single quote. ie: '
QQ Double quote: ie: "
SystemRoot SystemRoot directory path
T Tab character. ie: \t
UNL Unix newline character. ie: \n

Hints

Hint 1: Variables are not case sensitive. Thus, %MyVar% is equivalent to %myvar%.

Hint 2: Variables can reference other variables or contain functions. These are dynamically expanded, as needed by the AuditShark Engine.

© 2011-2019 Moon River Software Inc. All rights reserved.
@AuditShark stay in touch