Some Sandboxie settings may include variables. These are placeholder names which are expanded to (replaced by) text which may be specific to a particular computer and user account. For example,
In this simple example, Sandboxie expands the variable Personal by the actual folder for the Documents folder.
The following table lists the variables that Sandboxie recognizes.
|Root path of Sandboxie installation
|Name of sandbox in which the program is running.
|User account in which the program is running.
|SID string identifying the user account in which the program is running.
|The number of the logon session in which the program is running.
|Location of program files folder.
Example: C:\Program Files
|Location of the Windows installation folder.
|First two characters of %SystemRoot%.
|Location of the print spool folder.
|Location of the user account root folder.
|Location of the shared user account root folder.
|Partial locations of the user account root folder, as defined in the registry key:
|Location of the Windows temporary files folder as defined in the registry key:
|Locations of user account and system folders as are known to Windows Explorer. For more information, see Shell Folders.
Global templates are part of the Sandboxie installation and located in the file Templates.ini in the Sandboxie installation folder. Additional local templates may be added to Sandboxie Ini. Any template may reference template variables in the form %Tmpl.SomeVariableName%. These variable names are not built into the core of Sandboxie. They must be defined in Templates.ini or Sandboxie.ini in a [TemplateSettings] section.
Any of the variables in the table above, including the Shell Folders and template variables, can be overridden by the Sandboxie Ini configuration file. To override a variable, add a parameter prefixed with Ovr..
When a variable is overridden in this way, its expanded value will always match the value specified in the configuration file.
Some of the variables in the table above are taken from the system registry. Those variables are ProgramFiles and any other variable that appears below ProgramFiles in the table above. For these variables, it is possible to specify "fallback" values in the Sandboxie Ini configuration file. To specify a fallback for a variable, add a parameter prefixed with Reg..
Note that "Ovr." style overrides (described above) will cause Sandboxie to ignore the registry. On the other hand, Sandboxie only checks "Reg." style fallbacks if the expanded variable cannot be found in the registry. This means that if both Ovr.X and Reg.X are specified for the same variable X, the Ovr.X form will always apply when X is expanded, and the Reg.X form will never apply.
It is generally preferable to use "Ovr." style overrides than "Reg." style fallbacks.