<VARPROMPT> ... </VARPROMPT>
block defines a user message
which is displayed if an environment variable is not defined.
This can only be specified at the root level in the script, i.e. in the
WARPIN
block.
See the "Installation Scripts"
page for an overview where this element should be placed.
If you specify environment variables with macro resolution, you must make sure that the environment variable is defined on the user's system.
If it is defined, WarpIN will simply replace the $(var)
stuff in a
script part which supports macro resolution with the value of the environment variable.
This is sufficient with many of the predefined system variables set through CONFIG.SYS
and the predefined script variables defined by WarpIN.
However, there may be situations where you cannot be sure that an environment variable
exist. For example, the MMBASE
variable will only be set if the OS/2
multimedia subsystem (MMPM/2) is installed on the user's system. In those cases, the
installation must either fail with a meaningful error message or the user should get
an opportunity to enter a value for that variable.
The same applies if you define your own environment variables for your application which are probably not defined on the user's system. You can therefore always force WarpIN to prompt for a value during the install process.
That's what the VARPROMPT
block was made for.
Syntax:
<VARPROMPT NAME="name" TYPE="{NUM(min,max)|ALPHA|PATH|FAIL}" >message</VARPROMPT>In between the
<VARPROMPT>
and </VARPROMPT>
tags, specify the message which should be shown to the user.
Attributes:
NAME="name"
Example:
<VARPROMPT NAME="MMBASE" TYPE="PATH" >Please specify the MPMM/2 base directory (e.g. F:\MMOS2): <VARPROMPT>
TYPE="{NUM(min,max)|ALPHA|PATH|FAIL}"
NUM(min,max)
: display the given message and prompt
for a numberical input, which must be >= min
and
<= max
.
This will display an "OK" and a "Cancel" button with the prompt.
ALPHA
: display the given message and prompt for any alphanumerical
input.
This will also display an "OK" and a "Cancel" button with the prompt.
PATH
: prompt for a full path specification, which WarpIN should
check for a valid syntax.
This will also display an "OK" and a "Cancel" button with the prompt.
FAIL
: do not prompt for input, but display the given message as
a error message with a "Cancel" button only. WarpIN will terminate afterwards.