Using environment variables in Visual Installer

It is possible to use Windows environment variables in Visual Installer. The environment variables can be used in the Registry tab and in the INI files tab in Visual Installer. You can find a list of supported environment variables in this Wikipedia page (see the Windows section).

You use an environment variable in the same way as a Visual Installer variable. For example, to include the %ProgramFiles% environment variable in a file path you can include it like this:

%ProgramFiles%\SamLogic\Visual Installer

And during the installation the %ProgramFiles% variable will be replaced with the current value that the system returns (usually C:\Program Files (x86)).

The picture below shows how to use the %COMPUTERNAME% environment variable in the Registry tab in Visual Installer:

During the installation the %COMPUTERNAME% variable will be replaced with the current computer name of the computer.

Support for environment variables is a new feature in Visual Installer 2015
The feature described above is new in Visual Installer 2015 (version 10.5.3 and later). If you have an older version of Visual Installer and need this function we recommend you to upgrade to the latest version of Visual Installer.

See also
> With the SETENV command you can set environment variables from Visual Installer

Leave a Reply