InstallAware for Windows Installer
 

For Each

This command is used to automatically enumerate each element of a given list through a temporary variable. Loops started using this command must be ended using the Next command.

Collection

The list containing the elements to enumerate.

There is no pre-defined list syntax - any dereferenced variable or literal value is permitted in this field.

Separator

The separator that delineates each individual list element for enumeration. Different separators therefore allow for different enumerations on the same source lists.

Separators found at the beginning or at the end of a list, as well as consecutive separators with no elements in between, are not enumerated. In other words, the loop variable will never receive an empty value.

If the separator is not found in the collection, the entire list literal will be enumerated as a single element.

Element

The temporary variable that receives the current member of the list that is being enumerated.

This variable must not have been defined anywhere else in the script.

This variable will only be defined within the scope of the current loop.

Nested loops must use unique variables, but the same variable names may be re-used in non-nested loops.