Previous Topic: Add Symbolic LinksNext Topic: Add and Change Internal Procedures


Package Configuration Using Scripts

The PIF packaging format supports the execution of scripts containing procedures before and after package installation. These scripts can be defined for both the package and its components. The script file names must be specified in one of the components of the package.

Bourne-compatible shell scripts are assumed for execution. You can use other scripting languages, such as Perl, but then you need to specify the script interpreter.

Scripts use parameters to interchange information with the installation process. The following types of parameters are distinguished:

Internal parameters

Parameters set by the Installer and passed to the scripts.

User-defined parameters

Parameters defined by user-written installation scripts or provided through a response file or an installation dialog.

The following internal parameters are used:

PIF_BACKUP

Controls backup creation prior to updating or reinstalling an existing product version.

PIF_CHANGECONTROL_dialogelement

Controls whether a dialog element is grayed out if it is not used.

PIF_CHANGEPARAM_parameter

Controls whether the specified parameter can be edited using dialog elements. If PIF_CHANGEPARAM_parameter has the value 1 (True), dialog elements that alter the specified parameter are enabled. If the value is 0 (False), the specified parameter is not accessible.

PIF_CONTROL_NAME

Specifies the name of the field that was active (had the focus) before a script was called. Based on this information the script can behave differently depending on the field from where it was called. This internal parameter is passed to any validation script within a PIF dialog, that is, field validation script, action script, dialog validation script, and dynamic dialog detection script.

PIF_DIALOG_LANGUAGE

Specifies the language to use for the product installation. The value of this parameter is a 2 or 3 bytes language identifier, for example, ENU.

PIF_DIALOG_MODE

Indicates the installation dialog type. Possible values are:

JAVA, VT100, and NONE.

PIF_DIALOG_NAME

Specifies the name of the dialog corresponding to the selected button.

PIF_INSTALL_JOB

Identifies the install job. Possible values are:

INSTALL, REINSTALL, UPDATE, and REMOVE.

PIF_INSTALL_MODE

Specifies the install mode. Possible values are:

ATTENDED, UNATTENDED, and ASK.

PIF_INSTALL_PATH

Specifies the installation path of the PIF package.

PIF_LOCALE

Indicates the locale where the PIF package is to be installed.

PIF_LOG_FILE

Specifies the name of a log file.

PIF_MAINPRODUCT_DIR

Specifies the installation path of the main package.

PIF_PREINSTALL_DIR

Specifies the name of the temporary folder where the pre-installation components are extracted.

PIF_PRODUCT_NAME

Specifies the name of the PIF package.

PIF_PRODUCT_PLATFORM

Indicates the operating environment of the PIF package.

PIF_PRODUCT_VERSION

Specifies the version of the PIF package.

PIF_RESPONSE_FILE

Specifies the name of the response file used to provide parameter values.

PIF_RETAIN_CONFIGURATION

Controls the removal of configuration files.

PIF_SUPPLIER

Specifies the name of the vendor of the PIF package.