Compiler Variables And Run-Time Variables - Symantec WISESCRIPT PACKAGE EDITOR 8.0 - REFERENCE FOR WISE PACKAGE STUDIO V1.0 Reference

Table of Contents

Advertisement

Compiler Variables and Run-time Variables

WiseScript Package Editor Reference
Variable, or a Wizard Loop action to evaluate an expression, do not surround the
variables you reference in the expression with %.)
Do surround compiler variables with % characters no matter where you enter them.
Some actions (If, While, Set Variable, and some others) can use a more flexible scheme
that lets you use arithmetic expressions and other options.
See
Expression Operators
To read about sample scripts that use expressions, see ScriptHelp.htm in the Samples
subdirectory of this product's installation directory and find scripts that manipulate
strings and perform calculations.
When They Are Set
WiseScript uses two kinds of variables: compiler and run-time. When you start a compile
by clicking the Compile, Test, or Run button, the values of compiler variables are set
immediately, either by prompting you or by reading the values from the Compiler
Variables page. Script Editor then searches the entire script and replaces any instance of
the compiler variable with the value. These variables cannot be changed by end users
who run the installation .EXE.
Run-time variables are set by selections the end user makes on the installation's dialog
boxes, by characteristics of their computer, or by the contents of files on their hard disk
(example: a settings file, an .INI file, or the registry).
The difference between compiler variables and run-time variables is similar to the
difference in C programming between preprocessor variables and C language variables.
Preprocessor <#ifdef> statements determine which code is compiled. C language If
statements determine which code is executed at run time.
In Conditions and Expressions
You can use both types of variables in variable substitution. However, they have
distinctly different behaviors when used in conditions and expressions. When you enter
a regular variable into an expression, you do not need to surround it with % signs, but
when you enter a compiler variable in an expression, you must surround the compiler
variable with % signs.
With a condition based on run-time variables, all the script actions required by the
condition are included in the installation .EXE. WiseScript Package Editor doesn't know
which part of the condition will be executed until the installation .EXE is run because it
depends on variables whose values are not known until run time. The values of compiler
variables, on the other hand, are known when the installation .EXE is built. Therefore,
WiseScript Package Editor does not include the script actions inside a compiler variable
condition when building the installation .EXE.
Naming Compiler Variables
By convention, the names of compiler variables begin and end with an underscore.
WiseScript does not enforce this convention, but it might help you keep track of which
variables are known at compile time and which are known only at run time.
on page 253.
Using Script Editor
111

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Wisescript package editor 8.0

Table of Contents