Session variables are special types of variables that are expanded at runtime when they are used. When they are used on screens, their values are automatically expanded for you, however if a session variable is used in an action script, it must be manually expanded using the SessionVar.Expand action.
While there are predefined session variables available to use, you can also create custom session variables at design time and run time. At design time, they can be defined on the Session Variables tab of the Project Settings dialog. At run time, you can create and manipulate session variables using the available SessionVar actions.
Note: If a session variable used on a screen needs to be set to a different value, it must be set prior to the screen's displaying, and all of its events. Another option is to set the text of the screen control using the appropriate Dlg***.SetProperties action. Any changes made to a session variable on a screen after the screen has been created (just before the On Preload event) will have no effect.
The following pre-defined session variables are available in Setup Factory:
Your application's main directory, where all of your files and folders will be installed. For example, by default Setup Factory's main directory is C:\Program Files\Setup Factory 7.0.
%AppFolder% is initially set to the default value that you give it on the Session Variables tab of the Project Settings dialog. However, in most installations, the value of %AppFolder% will ultimately be set by the user on the Select Install Folder screen, overriding the default value.
The path to the per-user Application Data folder on the user's system. This folder serves as a common repository for application-specific data. Typically, this path is something like "C:\Documents and Settings\YourName\Application Data."
The path to the all-user Application Data folder on the user's system. This folder servers as a common repository for application-specific data. Typically this is something like "C:\Documents and Settings\All Users\Application Data."
The name of the shortcut folder on the Start menu where your application's shortcuts will be stored.
%AppShortcutFolderName% is initially set to the default value that you give it on the Session Variables tab of the Project Settings dialog. However, in many installations, the value of %AppShortcutFolderName% will ultimately be set by the user on the Select Shortcut Folder screen, overriding the default value %ProductName%.
The drive letter of %AppFolder%. You should not set this variable explicitly. It is reset every time that %AppFolder% is re-assigned. For example, if %AppFolder% is C:\Program Files\My Program, %AppDrive% will be C:.
The user's Common Files folder. Typically, this is something like: C:\Program Files\Common Files.
Your company’s name. The value of this variable is set on the Session Variables tab of the Project Settings dialog.
Your company’s URL. The value of this variable is set on the Session Variables tab of the Project Settings dialog.
The copyright message for your product. The value of this variable is set on the Session Variables tab of the Project Settings dialog.
The path to the user's DAO (Data Access Objects) directory.
The path to the user's Desktop folder. On Windows NT/2000/XP, this is the path from the per-user profile.
The path to the user's Desktop folder. On Windows NT/2000/XP, this is the path from the All Users profile. On a non-Windows NT system, this will simply be the path to the user's Desktop folder (the same as _DesktopFolder).
The path to the user’s font directory (e.g. "C:\Windows\Fonts").
The user's personal (My Documents) folder on their system. Usually this is something like "C:\Documents and Settings\YourName\My Documents" on Windows 2000/XP and "C:\My Documents" on Windows 98/ME.
Note: Windows 95 did not have the My Documents folder and this variable will return "C:" if run on such a system.
The name of the product that you are installing. The value of this variable is set on the Session Variables tab of the Project Settings dialog.
The version number of the product that you are installing. The value of this variable is set on the Session Variables tab of the Project Settings dialog.
The user's Program Files folder (typically, this is something like "C:\Program Files").
The name of the registered user of the system.
The organization of the registered user of the system.
The drive that the installation executable was run from (e.g. "C:" or "D:").
The full path to the folder that the installation executable was run from (e.g. "C:\Downloads" or "D:\").
The full path, including the filename, for the current setup executable.
For example, if the user was running "setup.exe" from "C:\Downloads", %SourceFilename% would be expanded to "C:\Downloads\Setup.exe".
The path to the user's Start menu folder. On Windows NT/2000/XP, this is the path from the per-user profile.
The path to the user's Start menu folder. On Windows NT/2000/XP, this is the path from the All Users profile. On a non-Windows NT system, this will simply be the path to the user's Start menu folder (the same as %StartFolder%).
The path to the Programs folder in the user's Start menu. On Windows NT/2000/XP, this is the path from the per-user profile.
The path to the Programs folder in the user's Start menu. On Windows NT/2000/XP, this is the path from the All Users profile. On a non-Windows NT system, this will simply be the path to the Programs folder in the user's Start menu (the same as %StartProgramsFolder%).
The path to the user's Startup folder. On Windows NT/2000/XP, this is the path from the per-user profile.
The path to the user's Startup folder. On Windows NT/2000/XP, this is the path from the All Users profile. On a non-Windows NT system, this will be the path to the user's Startup folder (the same as %StartupFolder%).
The path to the user’s Windows System folder (e.g. "C:\Windows\System").
The drive that the user's Windows System directory is located on (usually "C:").
The path to the user's Temp folder.
The path to the temporary directory where Setup Factory extracts the files it will need for the installation. (For example, this is the directory where Primer files are extracted to.) During the uninstall, this variable contains the path to the uninstall files folder. This is the folder that the uninstall configuration file is located.
Usually this directory will be the user's temporary directory, unless the user overrides the temporary directory with the /T command line option.
The path to the user’s Windows folder (e.g. "C:\Windows").
The text that will appear on the windows task bar while the installation is running. The value of this variable is set on the Session Variables tab of the Project Settings dialog.