Magic Folders

InstallAnywhere 2024 R2

Each magic folder represents a specific location, such as the end user–selected installation directory, the desktop, or the location for library files. At run time, the installer determines the operating system on which it is running, and it sets the magic folders to the correct absolute paths. Many magic folders are platform specific, and many are predefined by InstallAnywhere to standard locations across InstallAnywhere-supported platforms.

Magic Folders

Folder Name

InstallAnywhere Variable

Destination

User Installation Directory

$USER_INSTALL_DIR$

The installation folder, as specified by the end user. Developers can specify a default value for this variable in the Project Info screen in the Advanced Designer and choosing a location in the Default Install Folder area of the screen.

The value of this variable changes if the end user selects a non-default install location.

Programs Folder

$PROGRAMS_DIR$

The default application directory on the destination system. (Program Files on Windows. Applications folder on OS or OS X. Home directory of the end user who is running the installer on UNIX.)

Shortcuts

$USER_SHORTCUTS$

The folder specified by the end user as the shortcuts/links/aliases location. The value of this location can be changed by the end user if the Choose Alias, Link, Shortcut Folder action is turned on in the installer. You can specify a default value for this variable on a per-platform basis in the Platforms view on the Project page in the Advanced Designer.

Desktop

$DESKTOP$

This variable represents the desktop on the target machine. This folder only resolves on Windows, Linux, and systems.

Temp Directory

$TEMP_DIR$

This variable represents the temp directory on the target machine. When an end user is running the pure Java installer on Windows, $TEMP_DIR$ resolves to the end user's home directory.

Installer Temp Directory

$INSTALLER_TEMP_DIR$

The temp directory for use by the installer. This is deleted when the installation is complete, assuming no items are in use.

Startup

$STARTUP$

The automatic startup folder for items that are launched automatically during operating system boot up. This folder only resolves on Windows systems.

Installation Drive Root

$INSTALL_DRIVE_ROOT$

The root directory on the volume where the installation is taking place.

Home Directory

$USER_HOME$

The home directory of the end user running the installer. For users who have already included the variable $UNIX_USER_HOME$, this variable will continue to function with the same definition as $USER_HOME$.

Programs Folder (64‑bit)

$PROGRAMS_DIR_64$

The default 64-bit application directory on a 64-bit system.

Programs Folder (32‑bit)

$PROGRAMS_DIR_32$

The default 32-bit application directory on a system.

System Drive Root

$SYSTEM_DRIVE_ROOT$

The root directory of the system drive.

Java Home

$JAVA_HOME$

The home directory of the Java Virtual Machine to be used.

Windows

$WIN_WINDOWS$

The Windows directory on Windows computers.

System

$SYSTEM$

This variable represents the System folder on the target machine.

System Folder (64‑bit)

$SYSTEM_64$

The default 64-bit System folder on a 64-bit system.

System Folder (32‑bit)

$SYSTEM_32$

The default 32-bit System folder on a system.

Start Menu

$WIN_START_MENU$

The Start menu directory on Windows computers.

Quick Launch Bar

$WIN_QUICK_LAUNCH_BAR$

The Quick Launch Bar on Windows. On Windows 2000 or newer, the location is relative to the UserProfile environment variable.

Do Not Install

$DO_NOT_INSTALL$

A special Magic Folder for installer files that are not needed on the target platform. $DO_NOT_INSTALL$ is most commonly applied to files (typically localized license agreements and graphics) that are used during installation but need not remain on the target system.

USER_MAGIC_FOLDER_n

$USER_MAGIC_FOLDER_n$

These variables are user-defined install-destination Magic Folders. They install to whichever directories their variable name has been set. To set these variables, use one of the Set InstallAnywhere Variable actions.

For UNIX-based systems, if the leading / is omitted in the path before the Magic Folder location, the location resolves to

<installer location>/USER_MAGIC_FOLDER_n.

UNIX-based operating systems assume that any path not preceded by a / is below the current directory.

Programs Menu

$WIN_PROGRAMS_MENU$

The Programs menu (in the Start menu) on Windows systems.

All Users Start Menu

$WIN_COMMON_START_MENU$

The All Users Start menu directory for Windows computers.

All Users Programs Menu

$WIN_COMMON_PROGRAMS_MENU$

The All Users Programs menu (in the Start menu) directory for Windows computers.

All Users Startup

$WIN_COMMON_STARTUP$

The All Users Startup folder (in the Start menu) on Windows computers.

All Users Desktop

$WIN_COMMON_DESKTOP$

The Windows Common Desktop folder on Windows computers.

Fonts

$FONTS$

The Fonts directory on Windows-based systems; for example, $WIN_WINDOWS$\Fonts.

For more information, see Installing Fonts.

User Applications

$X_USER_APPLICATIONS$

The User Applications directory of the end user running the installer (OS or OS X only).

The Dock

$X_DOCK$

The OS or OS X Dock (for Shortcuts only). Other types of files cannot be installed to the Dock.

/usr/local/bin

$UNIX_USR_LOCAL_BIN$

The /usr/local/bin directory (UNIX-based systems only).

/opt

$UNIX_OPT$

The /opt directory (UNIX computers only).

/usr/bin

$UNIX_USR_BIN$

The /usr/bin directory (UNIX-based systems only).

See Also