This section summarizes the operators of the GUI INF script language.
;
Comment operator. All characters after the semicolon on the same line are ignored.
+
The line continuation operator. Indicates that Setup should interpret the line as a continuation of the same line.
!
Used with a variable, as !var. Indicates that var is a variable that might have been defined in another shell section. Use this operator to refer to global variables defined by the Setup program.
?
Detect operator. Used only in detect sections, this operator indicates that a variable’s value can be a value string returned from a DLL function. For instance, var = value[?LibHandle_or_PathFunctionName[Args]*].
{}
List operators. When the first character of a value string is ‘{‘, the Setup program interprets the string as a list. A list value is a string that begins with ‘{‘, ends with ‘}’, and contains zero or more comma-separated items.
The following operators are used with parentheses to perform an operation on the arguments within the parentheses.
$
The syntax is $(var). The interpreter looks up the var variable in the symbol table and performs a textual substitution. Use with the ! operator for global variables.
*
The syntax is *(ListVar,N). N represents the Nth item from a list operator. The interpreter performs a textual substitution using the Nth item from the specified INF list. List item numbering begins with one. For example:
set List = {one, two, three, four}
set Item = *($(List), 3) ;sets Item to "three"
>
This operator is an append to list operator. The syntax is >(ListVar,ListItem) where the ListItem string is appended to the ListVar list. For example:
set List = {one, two, three, four}
set List = >($(List), five)
; value of List is now {one, two, three, four, five}
This operator can be used to append a new item to the end of an existing list to form a new list:
set MyList = {1,2,3}
set MyNewList = ($(MyList), 4)
; creates MyNewList {1,2,3,4}
^
The syntax is ^(SectionName, N). Denotes the Nth item from each line of the section indicated by SectionName. An example of this syntax is:
[key =] value1 [, value2]*
Note that the section lines can include or omit the leading "key =", and can have multiple values separated by commas or whitespace. In the example above, key is item 0, value1 is item 1, value2 is item 2, and so on. Thus given the following [Languages] section contents:
[Languages]
FRN, French
ENG, English
SPN, Spanish
the set commands, using the ^ operator, set the CodeList and DescList variables as follows:
set CodeList = ^(Languages, 1)
; CodeList is now {"FRN", "ENG", "SPN"}
set DescList = ^(Languages, 2)
; DescList is now {"French", "English", "Spanish"}
#
The syntax is #(DetectSection, var, N). The interpreter performs a textual substitution using the Nth item from a DetectSection line identified by a specified var. Item numbering is the same as described for the ^ operator. For example given the following [Languages] section:
[Languages]
FRN, French
ENG, English
SPN, Spanish
the set command, using the # operator, sets the Language variable to Spanish.
set Language = #(Languages, C, 2)