Magic Folders and Variables
InstallAnywhere 2024 R2
Every magic folder has an associated InstallAnywhere variable. These variables are first initialized when the installer begins. Changing the value of a magic folder variable changes the destination to which the magic folders will be installed. Changing the value of the $USER_INSTALL_DIR$ through InstallAnywhere changes where the files will be installed.
With three exceptions, these variables are initialized at install time and will not change except through using custom code or the Set InstallAnywhere Variable action. The exceptions are:
• | Exception #1: $USER_INSTALL_DIR$—This is initialized to the default value determined in the Platforms view on the Project page in the Advanced Designer. Its value can change at the Choose Install Folder step if the end user selects a different folder. |
• | Exception #2: $USER_SHORTCUTS$—This is initialized to the default value determined in the Platforms view on the Project page in the Advanced Designer. Its value can change at the Create Alias, Link, Shortcut install step if the end user selects a different location. |
• | Exception #3: $JAVA_HOME$—This exception has two variations: |
• | Installer without VM—Defaults to the value of the Java property java.home. Its value can change at the Choose Java Virtual Machine step if the end user selects a VM. |
• | Installer with VM—Defaults to the value that is specified on the General subtab of the Search Panel Settings tab (Project page > JVM Settings view). It can change when the $USER_INSTALL_DIR$ location changes or at the Choose Java Virtual Machine step if the end user selects a VM already on their machine. |
Note:Variables cannot be set to themselves unless they are defined with the Evaluate at Assignment option. For variables defined without the Evaluate at Assignment check box selected, you cannot set USER_MAGIC_FOLDER_1 = U$SER_MAGIC_FOLDER_1$/$test to append /test to USER_MAGIC_FOLDER_1. InstallAnywhere allows direct and indirect recursion only with InstallAnywhere variables that use Evaluate at Assignment. Otherwise, this condition causes an error.
See Also