All predefined InstallMate projects contain the symbolic variables INSTALLDIR and PRIMARYFOLDER. This article explains what they are used for.

The folder alias of the predefined product installation folder.
A symbolic variable that defines which folder (alias) is considered to be the "main" installation folder. The main installation folder is the one whose path is recorded in the product's Uninstall information on the target system and is used to calculate the approximate installation size. (This does not preclude the use of other folders for installation.) The current PRIMARYFOLDER folder is indicated in red in the folders tree on the Files and folders page: Primary folder or Primary folder with UAC shield


INSTALLDIR is a folder alias and can therefore be used as a symbolic variable:

<INSTALLDIR>       - By default, resolves to C:\Program Files\YourProductName or similar

The PRIMARYFOLDER symbol is not a folder alias itself; it contains the name of a folder alias. (This is inherited from MSI; a clearer name for this variable would have been PrimaryFolderAlias or something like that.) This means that obtaining the actual main installation folder path requires a double indirection, like this:

<PRIMARYFOLDER>    - By default, resolves to INSTALLDIR
<<PRIMARYFOLDER>>  - By default, resolves to C:\Program Files\YourProductName or similar

Using the Indirect symbol option

Indirect symbol accessMost actions and dialog controls that are linked to a symbolic variable contain an Indirect symbol check box. If you use the PRIMARYFOLDER variable in those actions or controls, then you should use the Indirect symbol option instead of enclosing the variable name in < and > (see screen shot).


As with all other aspects of an InstallMate project, you are free to change what INSTALLDIR or PRIMARYFOLDER refer to. For example, you can:

However, you should only make changes if you understand how the installer uses these elements (see next section).

Where INSTALLDIR and PRIMARYFOLDER occur in a project

INSTALLDIR and PRIMARYFOLDER appear in various places throughout a typical InstallMate 9 project, as shown below.

Where What Usage
Files and folders page Folders tree INSTALLDIR corresponds to the Target System\Program Files (32-bit)\<ProductName> folder; you can move (drag & drop) this folder to a different location depending on your needs.
Set as Primary Folder
(folder popup menu)
Sets the value of PRIMARYFOLDER to the alias of the currently selected folder.
Components page Product component
(top-level component)
The top-level <ProductName> component uses <PRIMARYFOLDER> as its Linked folder. (Note that this contains the required indirection.)
Actions page DoFirstInstall sequence,
SetInstallDir action
Uses indirection to set the value of the folder alias retrieved from <PRIMARYFOLDER>.
Variables page PRIMARYFOLDER variable Defaults to INSTALLDIR
Other uses Uninstall information Stores the path given by <<PRIMARYFOLDER>> as the InstallLocation.
Insert Installation folder
(various popup menus)
This command inserts the string <<PRIMARYFOLDER>> in the current field.