The <VARPROMPT> ... </VARPROMPT> block defines a user message which is displayed if an environment variable is not defined. This can only appear in the HEAD block.

If you specify environment variables with PCK tag 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.

In between the <VARPROMPT> and </VARPROMPT> tags, specify the message which should be shown to the user.

In addition, you must supply the following attributes to the opening <VARPROMPT> tag:


NAME=name
Required. This specifies the name of the environment variable which is prompted for.

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}
Required. This specifies what the prompt will do. This must be one of the following: