Using Environment Variables¶
Introduction¶
Setup packages created with InstallForge initialize a set of environment variables during runtime. These variables can be used for Custom Commands in order to perform more complex tasks during the installation of your application.
Environment Variables¶
The following table lists the supported environment variables.
Environment Variable Name | Description |
---|---|
IF_APPLICATION_NAME | Application name provided in the InstallForge Builder Environment when creating a setup package (see the Product Name field) |
IF_APPLICATION_VERSION | Application version provided in the InstallForge Builder Environment when creating a setup package (see the Product Version field) |
IF_COMPANY_NAME | Company name provided in the InstallForge Builder Environment when creating a setup package (see the Company Name field) |
IF_INSTALLPATH | Installation path selected by the user on the Select Application Folder dialog of the setup |
IF_LANGUAGE | Language selected by the user at startup of the setup. The content of this constant corresponds to the name of the language file without extension as it was defined when building the setup package. When setup package is monolingual the content will be empty. |
IF_ORGANIZATION | Organization entered by the user on the setup serial validation dialog |
IF_SERIAL | Serial entered by the user on the setup serial validation dialog |
IF_USERNAME | User name entered by the user on the setup serial validation dialog |
Example¶
In this example, a text file containing the application version as a string will be created during the installation by using the Custom Commands feature and the IF_APPLICATION_VERSION
environment variable.
Please complete the following steps:
- In the InstallForge Builder Environment, click
General
in the explorer bar and enter a version in theProduct Version
field. - Click
Commands
in the explorer bar, clickAdd...
on theCommands
tab widget. - On the
Edit Command window
, selectShell Execute
as command type. - In the
Command
field, enter: - Click
Ok
on theEdit Command
window.