If you have used a programming language before you are probably very familiar with variables. If not, you can read this Wikipedia article to get a basic knowledge about variables.
Also Visual Installer can handle variables. Most variables are automatically set during the setup process and are used to handle for example drive letters, system folders, application folders, date, time, license keys, version information etc. Variables can also be used to retrieve values from the Registry in Windows.
Variables can be used in many places in Visual Installer, for example in all main tabs in the editor (e.g. File list, Registry, INI files, Components tabs etc.). Variables can also be used with the most setup dialog boxes in Visual Installer and with the scripting language.
The %DESTDIR variable
One of the most used variables in Visual Installer is the %DESTDIR variable. This variable contains the main destination folder for the setup project. The contents is read from the Main folder text box in the File list tab.
In the main folder text box it is common to include the %PROGRAMFILES variable. The %PROGRAMFILES variable will be replaced with the current path to the Program Files folder in Windows during the installation. We explain more in this blog post:
> Visual Installer: How do I install files to the Program Files folder?
List with variables
You can open and view a list with all available variables in the Visual Installer editor. If you open for example the Registry tab in the editor and clicks on the Variables button, the following window is opened:
In the Variables window you can see a list of all available variables in Visual Installer. To get a description of each variable, you can press the F1 key.
(If you double-click on a variable name in the Variables window, the variable will be inserted at the cursors position, if a text editor was active before you clicked the Variables button.)
Environment variables
Visual Installer can also handle Windows environment variables. You can read more about this in the following blog post: