Sandbox Overview
Previous  Top  Next


The sandbox holds runtime modifications that applications make as they are running. The original EXE that you have built never changes, so it can be placed in a shared folder with read-only access.

The name of a sandbox (SANDBOXNAME) is specified in the package.ini file prior to build.

Under normal circumstances, the sandbox is stored under %AppData%\Thinstall\SANDBOXNAME. On Windows XP this path would be C:\Documents and Settings\USERNAME\Application Data\SANDBOXNAME.

During startup, Thinstall searches for an existing Sandbox in the following locations in the order listed below. If a sandbox already exists, Thinstall will use the existing sandbox rather than creating a new one.

Search using an application-specific environment variable

1. %SANDBOXNAME_SANDBOX_DIR%.ComputerName
Example: If SANDBOXNAME="Mozilla Firefox 1.0" then the environment variable "Mozilla Firefox 1.0_SANDBOX_DIR.ComputerName" is consulted
2. %SBNAME_SANDBOX_DIR%

Search using a global environment variable that applies to all Thinstalled applications

3. %THINSTALL_SANDBOX_DIR%.ComputerName\SANDBOXNAME
Example: THINSTALL_SANDBOX_DIR.ComputerName

4. %THINSTALL_SANDBOX_DIR%\SANDBOXNAME

Search for an application-specific 'local' sandbox

5. ExeDirectory\SANDBOXNAME.ComputerName
6. ExeDirectory\SANDBOXNAME

Search for a 'local' sandbox for all Thinstalled applications

7. ExeDirectory\Thinstall\SANDBOXNAME.ComputerName
8. ExeDirectory\Thinstall\SANDBOXNAME

Use the value "
SandboxPath=" from Package.ini to determine a custom sandbox path this option is set
7. SANDBOXPATH\SANDBOXNAME.ComputerName
8. SANDBOXPATH\SANDBOXNAME

Search in the user's "Application Data\Thinstall" folder for a sandbox

9. %AppData%\Thinstall\SANDBOXNAME.ComputerName
10. %AppData%\Thinstall\SANDBOXNAME


If an existing sandbox cannot be found, Thinstall will create a new sandbox. Thinstall creates a new sandbox using the following logic:

1. If SANDBOXNAME_SANDBOX_DIR environment variable is set, try to create a sandbox at this location
2. If THINSTALL_SANDBOX_DIR environment variable is set, try to create a sandbox at this location
3. If SANDBOXPATH Package.ini option is set, try to create a sandbox at this location
4. Try to create a sandbox in the user %AppData%\Thinstall folder

Notes:
SANDBOXNAME and SANDBOXPATH come from the Package.ini file

Example Scenarios:

Scenario: I want to run from USB Flash and have my sandbox load and save to the same directory where the EXE is located
How to accomplish: Set "SandboxPath=." in your package.ini file in the [BuildOptions] section.

Scenario: My users have a mapped drive to store their files and I want the sandbox stored on the mapped drive.
How to accomplish:
Option 1. Use "SandboxPath=z:\Sandbox" if the drive is always mapped to the same letter
Option 2. In the user login script, set the environment variable "THINSTALL_SANDBOX_DIR=z:\Sandbox". Any Thinstalled application run after setting this variable will use z:\Sandbox for it's sandbox storage location.