Script Condition
Previous Topic  Next Topic 

This condition is a Tcl script that is substituted and then evaluated by Tcl's expression parser.  This is not a condition that is used for full scripts.  It is used for a combination of expressions that are combined together.  To use an actual Tcl script as a condition, use the Execute Script Condition.



Standard Properties 

See Standard Condition Properties.



Advanced Properties


Script

A Tcl expression to evaluate.  The entire expression is substituted for virtual text before being evaluated.



Example


The following example is a valid Tcl expression:


[string is true <%RunningInstaller%>] && [string is true <%UpgradeInstall%>]


Note that this an expression, not a full Tcl script.  An expression is multiple commands that are strung together using expression operators like && and ||.  The following is not a valid expression:


set test1 [string is true <%RunningInstaller%>]

set test2 [string is true <%UpgradeInstall%>]

return [expr {$test1 && $test2}]


This is a full Tcl script to be evaluated, not an expression.  This type of script can be used in the Execute Script Condition, but not in a Script Condition.