Search Order for the Sandbox
During startup of the captured application, ThinApp searches for an existing sandbox in specific locations and in a specific order. ThinApp uses the first sandbox it detects. If ThinApp cannot find an existing sandbox, ThinApp creates one according to certain environment variable and parameter settings. Review the search order and sandbox creation logic before changing the placement of the sandbox.
The search order uses Mozilla Firefox 3.0 as an example with the following variables:
<sandbox_name> is Mozilla Firefox 3.0
The SandboxName parameter in the Package.ini file determines the name. See “SandboxName” parameter in ThinApp Package.ini Parameter Reference Guide.
<sandbox_path> is Z:\sandboxes
The SandboxPath parameter in the Package.ini file determines the path. See “SandboxPath” parameter in ThinApp Package.ini Parameter Reference Guide.
<exe_directory> is C:\Program Files\Firefox
The application runs from this location.
<computer_name> is JOHNDOE-COMPUTER
%AppData% is C:\Documents and Settings\JohnDoe\Application Data
ThinApp requests the Application Data folder location from the operating system. The location depends on the operating system or configuration.
ThinApp starts the sandbox search by trying to find the following environment variables in this order:
This environment variable changes the sandbox location for specific applications on the computer. For example, if the Mozilla Firefox 3.0_SANDBOX_DIR environment variable exists, its value determines the parent directory sandbox location. If the value is z:\FirefoxSandbox before you run the application, ThinApp stores the sandbox in z:\FirefoxSandbox.JOHNDOE-COMPUTER if the directory already exists. If the directory does not exist, ThinApp creates a sandbox in z:\FirefoxSandbox.
This environment variable changes the location of all sandboxes on a computer. For example, if the THINSTALL_SANDBOX_DIR environment variable exists, its value determines the parent directory sandbox location. If the value is z:\MySandboxes before you run the application, ThinApp creates a sandbox in z:\MySandboxes.
If ThinApp does not detect the %<sandbox_name>_SANDBOX_DIR% or %THINSTALL_SANDBOX_DIR% environment variable, ThinApp checks for the following file system directories and creates a sandbox in the first directory it detects:
For example, C:\Program Files\Firefox\Mozilla Firefox 3.0.JOHNDOE-COMPUTER
For example, C:\Program Files\Firefox\Mozilla Firefox 3.0
For example, C:\Program Files\Firefox\Thinstall\Mozilla Firefox 3.0.JOHNDOE-COMPUTER
For example, C:\Program Files\Firefox\Thinstall\Mozilla Firefox 3.0
For example, Z:\sandboxes\Mozilla Firefox 3.0.JOHNDOE-COMPUTER
For example, Z:\sandboxes\Mozilla Firefox 3.0
For example, C:\Documents and Settings\JohnDoe\Application Data\Thinstall\Mozilla Firefox 3.0.JOHNDOE-COMPUTER
For example, C:\Documents and Settings\JohnDoe\Application Data\Thinstall\Mozilla Firefox 3.0
If ThinApp does not detect the %<sandbox_name>_SANDBOX_DIR% or %THINSTALL_SANDBOX_DIR% environment variable, and does not detect the specified file system directories, ThinApp creates a sandbox using the following guidelines in this order:
If the SANDBOXPATH Package.ini parameter is set, the value determines the sandbox location.
Note Only one computer at a time can use a shared sandbox. If a computer is already using a sandbox, ThinApp creates a new sandbox to allow you to continue working until the previous copy of the sandbox closes.