Compiler Variable Actions - Symantec WISESCRIPT EDITOR 8.0 - REFERENCE FOR WISE PACKAGE STUDIO V1.0 Reference

Table of Contents

Advertisement

Compiler Variable Actions

WiseScript Editor Reference
Compiler Variable If, Else, and End actions are used in an If block to let you compile
different versions of an installation. You set the value of a compiler variable at compile
time, and the actions inside a compiler variable If block are added to the script
according to the value of the compiler variable
You create compiler variables on the Compiler Variables page. When you create a
compiler variable, you specify its default value. You also specify when you should be
prompted for a compiler variable value.
See
Compiler Variables
on page 17.
Example:
On the Compiler Variable page, create a compiler variable named _DEBUG_ with a
default value of "N".
Mark the Compiling From Within Wise option.
In the installation script, add a Compiler Variable If action that checks if _DEBUG_
equals "Y".
Below the Compiler Variable If action, add an Add Text to INSTALL.LOG action that
contains useful debug information.
End the If block with a Compiler Variable End action.
When you compile, you are prompted for the value of this compiler variable. Change
it to "Y".
The Add Text to INSTALL.LOG action within the Compiler Variable If block is added to
the final script. The debug information you requested then appears in the installation
log.
To create a compiler variable If block
1.
Add a Compiler Variable If action and complete the dialog box:
If Variable
Build an If statement by selecting a compiler variable and a comparison. The
first list shows compiler variables on the Compiler Variables page. The second
list shows available comparisons.
The Value
Enter the value to be used in the comparison. This is case-sensitive. Do not
enter variables in this field, because it checks your computer in real time, not
run time.
If you selected File Exists above, the If statement checks to see if the file that
you enter in The Value exists. If you selected File Version Equal or Greater,
enter the file in The Value.
2.
Below the Compiler Variable If action, add one or more actions to perform if the
compiler variable has the specified value.
3.
(Optional) Add a Compiler Variable Else action, followed by one or more actions to
perform if the compiler variable does not have the specified value.
4.
Add a Compiler Variable End action.
The sample script Compvar.wse uses this action. For details on sample scripts, see
ScriptHelp.htm in the Samples subdirectory of this product's installation directory.
WiseScript Actions
57

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Wisescript editor 8.0

Table of Contents