Secure deletion problems and a workaround

If it doesn't fit elsewhere, it goes here
Post Reply
Unknown_User_461
Posts: 0
Joined: Wed Dec 31, 1969 7:00 pm

Secure deletion problems and a workaround

Post by Unknown_User_461 » Sat Oct 21, 2006 5:41 am

First, the Problem:

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 first three lines rename the folder to a much shorter "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%"
The c:\... part is the name of the batch you created above.

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.

SBIE User

Post by SBIE User » Sat Oct 21, 2006 12:01 pm

revolution,

That's a creative solution. The other alternative is to use eraserl.exe as suggested by monami in a similar thread under "Problems." Eraserl.exe is not a DOS utility and can handle long file names natively, so long file names do not present a problem for it.

Thanks for this idea. I like creative solutions, and I'm still a batch file programmer.

SBIE (Happy User)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest