One of the best practices when packaging with ThinApp includes verifying no processes are left running that lock the Sandbox when you shuts down the application. You can simply verify this by trying to delete the package’s Sandbox. If it is locked and you cannot delete it, some process is still running.
To determine wich process locks the sandbox i use Process Explorer.
In my case the child process ‘svchost.exe’ kept the sandbox locked.
Because it was running outside of the thinapp the ‘OnLastProcessExit function’ is never called.
The solution to that problem can be found in the ThinApp User’s Guide on page 83a.
In the package.ini you can specify exceptions to running child processes in the virtual environment.
The setting i used was:
Another process that can keep the SandBox locked is ‘ctfmon.exe’ (advanced text services)
You can simply disable this process by adding the following to the HKEY_CURRENT_USER.txt file:
Value=Disable Thread Input Manager
A. Reference: http://www.vmware.com/pdf/thinapp46_manual.pdf page 83