Skip to content

Working with Variables

Variables are dynamic containers for system paths, user inputs, or runtime values. They make your installer adapt to different environments without hardcoding paths or settings.

Variables are identified by a name enclosed in % signs (e.g. %DESTPATH%). When the package runs, each identifier is replaced by its actual value.

FeatureRequirement
SyntaxMust start and end with % (e.g. %MYVAR%)
NamingLetters, numbers, and underscores only — no spaces or special characters
ReservedNames starting with PB are reserved for internal use
Data TypeUnicode text (max 4096 wide characters)
BooleansLogic handled via 1 (True) and 0 (False)
  1. Click the Variables button in the toolbar to open the Variable Manager.

    Variable Manager

  2. Click Add to create a new variable.

  3. Configure the Name, Type (Path, String, or Boolean), and Initial Value.

  4. Click OK to register the variable.

System Paths

Locations like %WIN%, %SYS%, %TMP%, %APPDATADIR%, and hundreds more — initialized automatically at runtime.

Package Information

Details about the installer: %APPTITLE%, %ARCNAME%, %ARCFILEVER%, %ARCPRODVER%, etc.

Installation Scope

Scope-aware paths that adapt to per-user or all-user installations: %PBINSTALLSCOPEDIR%, %PBSHORTCUTROOT%, %PBDESKTOPROOT%.

Runtime State

Flags and values set during execution: %DESTPATH%, %ISADMIN%, %SILENT%, %TOTALEXTFILE%, etc.