Flow Control

InstallShield 2014 » InstallScript Language Reference

Like most programming languages, InstallScript processes statements within a function block sequentially, starting with the first statement and ending with the last. The linear flow of execution within a function block can be controlled with conditional statements that perform branching and iteration.

Branching is most commonly performed with an if statement that directs execution down one path or another. Iteration is performed with loop statements that execute one or more statements repeatedly, either for a set number of times or as long as a specified condition is met.

To control the flow of execution within scripts, InstallShield provides the following keywords:

abort
exit
for...endfor
goto
if...then...else...endif
repeat...until
return
switch...endswitch
while...endwhile