Global delete function

Ideas for enhancements to the software
Shield
Posts: 29
Joined: Wed Dec 10, 2008 5:45 am

Post by Shield » Fri Dec 12, 2008 9:30 pm

Thanks for your efforts wraithdu, but one thing I have noticed is if I keep sandboxed programs running they do not successfully terminate resulting in the sanbox not being properly deleted.

When I first using this, it gave me two errors from Sandboxie which I cannot reproduce (sorry did not record them down)

But I was able to consecutively reproduce these errors from these scenarios

Scenario A:
Box1 and Box2 open with apps.

Error message:
Delete Sandbox: Box1: Please terminate programs running in the sandbox before deleting its contents

Box1 app closed but only Box2 is successfully deleted.

If I close Box1 and leave Box2 open, only Box1 gets deleted.

Scenario B:
Box1 closed. Box2 open with apps.

Error message:
Delete Sandbox: Box2: Please terminate programs running in the sandbox before deleting its contents

Now, when I try to reproduce them, I get errors from Eraserl not being able to delete them.

I think it all steams from the apps not successfully terminating. I realize I could minimize the error by closing the apps but there are times where the apps process refuses to close unless I terminate it.

Anyone else facing these problems ?

MitchE323
Posts: 2268
Joined: Thu Nov 02, 2006 9:32 am

Post by MitchE323 » Fri Dec 12, 2008 10:56 pm

Are you deleting the contents of the sandboxes while they are open and in use?

Shield
Posts: 29
Joined: Wed Dec 10, 2008 5:45 am

Post by Shield » Fri Dec 12, 2008 11:18 pm

Yeah, I am.

But SBDelete was designed to terminate then delete, right? It's not exactly doing it's job.

MitchE323
Posts: 2268
Joined: Thu Nov 02, 2006 9:32 am

Post by MitchE323 » Fri Dec 12, 2008 11:23 pm

But SBDelete was designed to terminate then delete, right? It's not exactly doing it's job.
Well, it was a gift from wraith so it doesn't have a job but I just took it to be delete only. But maybe you are right.....

wraithdu
Posts: 1410
Joined: Fri Jun 29, 2007 2:54 pm

Post by wraithdu » Fri Dec 12, 2008 11:33 pm

It will do the same as tzuk's suggested BAT file. For each box it runs -

Start.exe /box:box1 /terminate
Start.exe /box:box1 delete_sandbox

If the apps are not being terminated, then perhaps there is another reason. Can you terminate these apps through Sandboxie Control, or must you use Task Manager?

SnDPhoenix
Posts: 2690
Joined: Tue Dec 26, 2006 5:44 pm
Location: West Florida

Post by SnDPhoenix » Fri Dec 12, 2008 11:36 pm

^Or maybe the /terminate switch is broken now? :shock:

wraithdu
Posts: 1410
Joined: Fri Jun 29, 2007 2:54 pm

Post by wraithdu » Fri Dec 12, 2008 11:39 pm

I just tested with 3.33.02 on my Vista machine. I had Firefox opened in one box, and WinRAR in another box. Both boxes successfully had their apps terminated and deleted in turn. Seems to work as advertised.

SnDPhoenix
Posts: 2690
Joined: Tue Dec 26, 2006 5:44 pm
Location: West Florida

Post by SnDPhoenix » Fri Dec 12, 2008 11:40 pm

I should test it myself, hold on... :P

wraithdu
Posts: 1410
Joined: Fri Jun 29, 2007 2:54 pm

Post by wraithdu » Fri Dec 12, 2008 11:44 pm

Now, there's a more aggressive way to go about this... I could use the /listpids command to get running processes and use another app like taskkill to forcibly kill them instead of the /terminate command. I'd rather not though...

MitchE323
Posts: 2268
Joined: Thu Nov 02, 2006 9:32 am

Post by MitchE323 » Fri Dec 12, 2008 11:44 pm

OK I got it - Terminate and delete - :D tested here; IE in a box Powerpoint in another and Psp in a third. All deleted and closed. :D

SnDPhoenix
Posts: 2690
Joined: Tue Dec 26, 2006 5:44 pm
Location: West Florida

Post by SnDPhoenix » Fri Dec 12, 2008 11:47 pm

Nope, doesnt work here. :shock:
For me I ran notepad sandboxed and also stuck some junk in the sandbox just to populate it, then in SBDelete when I selected the sandbox and tried to empty it, I got this message:
Image
Though the weird thing is that notepad did indeed terminate... but the sandbox wasn't emptied, I had to do it myself...

wraithdu
Posts: 1410
Joined: Fri Jun 29, 2007 2:54 pm

Post by wraithdu » Fri Dec 12, 2008 11:59 pm

I could throw in a pause between the terminate and delete phases...do you think 500ms is long enough? Cause if the apps are indeed terminated, then it's just a timing thing. I'm already using a RunWait() command, so the commands won't proceed until the previous one has finished. I suppose Start.exe could end before all the running apps have fully stopped...

SnDPhoenix
Posts: 2690
Joined: Tue Dec 26, 2006 5:44 pm
Location: West Florida

Post by SnDPhoenix » Sat Dec 13, 2008 12:14 am

Yeah sure give it a try, half a second should be good :D

wraithdu
Posts: 1410
Joined: Fri Jun 29, 2007 2:54 pm

Post by wraithdu » Sat Dec 13, 2008 12:21 am

I'm gonna add a few more fun things -
1. SE_DEBUG privilege
2. termination options: 1) start.exe /terminate, 2) TerminateProcess() API

All options can be changed from the INI.
Last edited by wraithdu on Sat Dec 13, 2008 1:01 am, edited 1 time in total.

wraithdu
Posts: 1410
Joined: Fri Jun 29, 2007 2:54 pm

Post by wraithdu » Sat Dec 13, 2008 1:00 am

[ See new thread. ]

This version should pretty much do it. Now it will get the SE_DEBUG privilege if it can, and provides 2 termination methods via the 'terminate' value in the INI -
1 = use the TerminateProcess() API (default)
2 = use the Start.exe /terminate switch

Both methods will now wait up to 5 seconds for each process to close before issuing the delete_sandbox command. This negates the need for any predefined pause.
Last edited by wraithdu on Sun Dec 14, 2008 3:22 am, edited 2 times in total.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest