Skip to content

Global Variable Reference

Global variables are pre-defined by Paquet Builder and initialized automatically at runtime. They provide essential information about the system environment, the logged-in user, and the package’s own state.

In the tables below, the Profile column indicates whether the variable points to a user-specific or system-wide (common) location:

  • User: Points to the profile of the user currently running the package.
  • Common: Points to the “All Users” profile.
  • Note: On systems without administrator rights, “Common” variables often resolve to the same location as “User” variables.

These variables provide details about the installer file and its versioning.

VariableDescription
%APPTITLE%The Package Title defined in your project.
%ARCFILEVER%The file version of the package (e.g., 1.2.0.0).
%ARCPRODVER%The product version of the package.
%ARCNAME%The full filename of the running self-extracting package.
%ARCPATH%The directory path where the package is currently located.
VariableDescription
%DESTPATH%The final destination folder selected by the user. Note: This is only initialized after the file extraction process begins.
%TMP%Path to the current user’s temporary folder.
%CUR%Points to the current working directory of the package process.
VariableDescriptionProfile
%APPDATADIR%Path to the Roaming Application Data folder.User
%LOCALAPPDATADIR%Path to the Local (non-roaming) Application Data folder.User
%LOCALAPPDATALOWDIR%Path to the LocalLow Application Data folder.User
%DESKTOPDIR%Path to the current user’s Desktop.User
%MYDOCDIR%Path to the “My Documents” folder.User
%PROGMENUDIR%Path to the “Programs” folder on the Start Menu.User
%STARTMENUDIR%Path to the top level of the Start Menu.User
%STARTUPMENUDIR%Path to the “Startup” folder on the Start Menu.User
%FAVORITESDIR%Path to the Favorites folder.User
%TEMPLATESDIR%Path to the Templates folder.User
%QUICKLAUNCHDIR%Path to the Quick Launch folder.User
%SENDTOMENUDIR%Path to the “Send To” context menu folder.User
%USERPROFILE%Path to the root of the user’s profile (e.g., C:\Users\John).User
VariableDescriptionProfile
%COMAPPDATADIR%Path to the common Application Data folder.Common
%COMLOCALAPPDATADIR%Path to the common Local Application Data folder.Common
%COMDESKTOPDIR%Path to the common (shared) Desktop.Common
%COMMYDOCDIR%Path to the common “Documents” folder.Common
%COMPROGMENUDIR%Path to the common “Programs” folder on the Start Menu.Common
%COMSTARTMENUDIR%Path to the common Start Menu root.Common
%COMSTARTUPMENUDIR%Path to the common “Startup” folder.Common
%COMFAVORITESDIR%Path to the common Favorites folder.Common
%COMTEMPLATESDIR%Path to the common Templates folder.Common
VariableDescription
%WIN%Path to the Windows directory (e.g., C:\Windows).
%SYS%Path to the Windows System32 directory.
%SYSROOT%The system drive (e.g., C:).
%PROGFILESDIR%Path to the “Program Files” directory.
%COMFILESDIR%Path to the “Common Files” directory.
%FONTSDIR%Path to the Windows Fonts folder.
VariableDescription
%IS64OS%1 if the OS is 64-bit (x64 or ARM64), 0 if 32-bit.
%OSARCH%Processor architecture: x86, x64, or ARM64.
%OSVER%Integer representing the OS name (see the OS Version Table below).

These variables are specifically useful when using the Installation Scope feature.

VariableDescription
%PBINSTALLSCOPE%0 = Per-user installation, 1 = All-users installation.
%PBINSTALLSCOPEDIR%Resolves to %LOCALAPPDATADIR%\Programs or %PROGFILESDIR% based on scope.
%PBSHORTCUTROOT%Resolves to the user or common Start Menu based on scope.
%PBDESKTOPROOT%Resolves to the user or common Desktop based on scope.
%PBSCOPEELEVATED%1 if the installer re-launched with UAC elevation, 0 otherwise.
VariableDescription
%ISADMIN%1 if the user has administrative rights, 0 otherwise.
%ISPOWERUSER%1 if the user belongs to the Power Users group, 0 otherwise.
%NEEDREBOOT%1 if a file replacement requires a system restart, 0 otherwise.
%SILENT%1 if the installer was launched in silent mode, 0 otherwise. Can be manually toggled.
%EXITCODE%The integer value returned by the package process upon closing.
%CURDATE%Current date in yyyyMMdd format.
%CURDATETIME%Current date and time in yyyyMMdd hh:mm:ss format.
%TOTALEXTFILE%The total number of files successfully unpacked during this session.
%SHORTCUTPATH%Path to the Start Menu folder selected by the user (when prompted). Available after file extraction.
%PBSFXPATH%Path to the temporary folder where the SFX overhead files are extracted at startup.
%PBUNINSTREGKEY%The unique registry key used by the Package Uninstaller to store uninstall information.
%PBDLGNEXTC%Caption of the “Next” button on the current dialog page. Can be changed at runtime.
%PBLASTDLG%Returns the dialog page ID of the previous dialog shown to the user.
VariableDescription
%PARAMCOUNT%The number of parameters passed to the installer.
%PARAMS%The entire command-line string passed to the package.
%PARAM%The first parameter (argument) in the command line.
%PARAM2%, %PARAM3%Specific parameters by position.
%PARAMx%The parameter at position x (from 2 up to %PARAMCOUNT%).
VariableDescription
%PBLANGID%The Locale ID (LCID) of the current display language.
%SELLANG%The display name of the selected language.

The %OSVER% variable returns an integer corresponding to the Windows version:

ValueWindows Version
0Unidentified (Future version)
1Windows NT 3.5
2Windows NT 4.0
3Windows 2000
4Windows XP
5Windows XP 64-Bit
6Windows Server 2003
7Windows Home Server
8Windows Server 2003 R2
9Windows Storage Server 2003
10Windows Vista Starter
11Windows Vista
12Windows Server 2008
13Windows 7
14Windows Server 2008 R2
15Windows 8
16Windows 8.1
17Windows Server 2012
18Windows Server 2012 R2
19Windows Server 2016
20Windows 10
21Windows 11
22Windows Server 2022

The character sequence for a carriage-return line-feed (CRLF) is /$.

For example, if you want a message box to display two lines:

Line1/$Line2

This will be rendered as:

Line1
Line2

The variables above cover the most commonly used paths. However, if you need to access additional Windows paths that are not available as built-in variables, you can use the Get Full Path of a Windows Known Folder action template to retrieve any path identified by a KNOWNFOLDERID constant.


The %ISADMIN% variable returns 1 if the current user has administrative rights, and 0 otherwise. The %ISPOWERUSER% variable returns 1 if the current user belongs to the Power Users group.

These variables are especially useful when you need to conditionally execute actions depending on the privilege level of the user running the package. For instance, you can use them in conditional expressions to show different messages or skip certain installation steps.