You can do this from Sandboxie's own settings actually.Rochey wrote:wraithdu, Thanks for the latest version of Portable Sandboxie.
I'd like to make a request that you have the option to delete the "%AppData%\Sandbox" folder when you exit Portable sandboxie.
Configuration -> Sandbox Settings -> Set Automatic Clean-Up Options -> Checkbox at the top of the page
This will delete the contents of the sandbox each time there are no running processes (but leave the 'Sandbox' root folder I believe).
---------------------
I thought about putting this into the launcher, but there are a few hangups.
1. The sandbox will not always be located in '%AppData%\Sandbox'. The user is free to change this in the INI file. So the value for BoxRootFolder would have to be read from the INI file, assuming it exists. There is the possibility to use FileRootPath for individual sandboxes.
2. NSIS does not understand/expand Shell Folder tokens like Sandboxie does. So I'd have to test if a token is used, separate it from the rest of the path, then find it and read it from the registry, place the expansion back into the path, then execute the command. This gets more complicated if the value is only in 'User Shell Folders' becuase all those values start with %USERPROFILE%, which is an environment variable. NSIS CAN expand env variables, however.
3. If you're worried about security then simply deleting the sandbox directory is not the way to go. You'll want to use some secure file wiper, like eraser to do that.
All that said, I'll take it into consideration again.