When using the Sandboxie "DeleteCommand" regkey sometimes the files names become too long and are unable to be accessed or deleted.
The reason being that, just before deletion, the "DefaultBox" folder is renamed to a much longer name starting with two underscores and finishing with a timecode. After the rename I found that some file names were too long to accessed throught the windows API and thus deletion fails.
And for the workaround:
create a batch file similar to this:
Code: Select all
cd %1
cd ..
ren %1 x
c:\sdelete.exe -p 2 -s -q x
The last line is your favourite delete command with "x"as the folfer to be deleted.
Then change you regkey to this:
Code: Select all
cmd /c c:\sandbox-delete.bat "%SANDBOX%"
Now with that I have no more trouble erasing the sandbox.
I hope this helps anyone that my be having the same problems with deletion.