Sandbox structure
Previous  Top  Next


This information is provided for understanding purposes; we do not recommend modifications to the sandbox directory structure directly.

The sandbox is stored using a file structure nearly identical to the build project structure. Macro names are used for shell folder locations instead of hard-coded paths. This allows the sandbox to migrate to different PCs dynamically when the application is run from new locations.

sandbox_img

In addition to shell folders like %AppData%, Thinstall will also create three registry files:

· Registry.rw.tvr (contains all registry modifications made by the application)  
· Registry.rw.lck (zero byte lock file used to prevent other computers from simultaneously using a registry located on a network share)  
· Registry.tvr.backup (contains a backup of the .tvr file from the last good execution, if corruption is detected on startup it will be restored)  

Additionally, if an application executes a child process, Thinstall will create a directory who's name looks like the following:

40000026500002i\

This directory stores a dynamically generated EXE stub for the child process so the correct name is displayed in explorer for that child process. You can delete these directories and they will be regenerated the next time they are required.

Sandbox FAQ

Q. If I copy files into the sandbox folder, they are not visible to the application. Why not?
Thinstall stores all of its filesystem information in the virtual registry; this allows it to optimize file system access in the virtual environment. For example, when an application tries to open a file, Thinstall does not need to consult the real filesystem twice to determine if the file exists or not (once for the real system location, and once for the sandbox location). Instead, Thinstall is able to check for the files' existence by only consulting the virtual registry, and, as a result, Thinstall can achieve great runtime performance. One artifact of this optimization is that if you copy files into the sandbox directory structure directly, the files will not be visible to the application. If the file already exists in the sandbox you can overwrite and update the file; however, we recommend leaving the sandbox alone and performing all modifications in the virtual environment instead.

Q. How can I view the virtual registry in the sandbox?
The command-line utility "vregtool" can be used to list the contents of a virtual registry file as shown below. You may notice that some of the virtual file system data is stored in under the registry tree HKLM\FS.

vregtool registry.rw.tvr printkeys

sb_only HKEY_LOCAL_MACHINE\FS\%Profile%\.gimp-2.2\unitrc
deleted HKEY_LOCAL_MACHINE\FS\%Profile%\.fonts.cache-1.NEW
writecopy HKEY_LOCAL_MACHINE\Software
writecopy HKEY_LOCAL_MACHINE\Software\Microsoft
writecopy HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
writecopy HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion
writecopy HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer
writecopy HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
writecopy HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
writecopy HKEY_LOCAL_MACHINE\Software\Thinstall
full HKEY_LOCAL_MACHINE\Software\Thinstall\ProcessList
full HKEY_LOCAL_MACHINE\Software\Thinstall\RuntimeObjects
full HKEY_LOCAL_MACHINE\Software\Thinstall\SxS
writecopy HKEY_CURRENT_USER\Software
writecopy HKEY_CURRENT_USER\Software\Microsoft
writecopy HKEY_CURRENT_USER\Software\Microsoft\Windows
writecopy HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion
writecopy HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer
writecopy HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2
writecopy HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\{c1664b80-e468-11db-8906-806d6172696f}
writecopy HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\{c1664b81-e468-11db-8906-806d6172696f}
writecopy HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\{c1664b82-e468-11db-8906-806d6172696f}
writecopy HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\{c1664b83-e468-11db-8906-806d6172696f}
writecopy HKEY_CURRENT_USER\Software\NVIDIA Corporation
writecopy HKEY_CURRENT_USER\Software\NVIDIA Corporation\Global
writecopy HKEY_CURRENT_USER\Software\NVIDIA Corporation\Global\nView