An external equivalent for "Auto Exec"

Ideas for enhancements to the software
lwc
Posts: 332
Joined: Tue Dec 19, 2006 6:37 am

An external equivalent for "Auto Exec"

Post by lwc » Tue Mar 04, 2008 7:21 am

Since "Auto Exec" is an internal command (within the sandbox's scope), I don't manage to duplicate sandboxes with it.

All I need is a Sandboxie "start up" command that does something externally before creating the sandbox.
Last edited by lwc on Wed Mar 05, 2008 9:08 am, edited 4 times in total.

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

Post by SnDPhoenix » Tue Mar 04, 2008 7:26 am

Maybe use a batch file, or code a AutoIt script to do what you want? :roll:

lwc
Posts: 332
Joined: Tue Dec 19, 2006 6:37 am

Post by lwc » Tue Mar 04, 2008 7:52 am

What do you mean run a batch file...? I need a Sandboxie "start up" command that would run anything, whether it's a batch file or not.

Just like "Delete Command" is an external command.

tzuk
Sandboxie Founder
Sandboxie Founder
Posts: 16076
Joined: Tue Jun 22, 2004 12:57 pm

Post by tzuk » Tue Mar 04, 2008 9:07 am

AutoExec does indeed run sandboxed programs. Maybe you can workaround that using OpenFilePath settings that will be limited to the program that you're running via AutoExec?
tzuk

lwc
Posts: 332
Joined: Tue Dec 19, 2006 6:37 am

Post by lwc » Tue Mar 04, 2008 9:56 am

Why not just an unsandboxed AutoExec? Just a "Startup Command" that will work like "Delete Command".

tzuk
Sandboxie Founder
Sandboxie Founder
Posts: 16076
Joined: Tue Jun 22, 2004 12:57 pm

Post by tzuk » Tue Mar 04, 2008 12:03 pm

Well, I don't think there is a need for an unsandboxed AutoExec. I suggested you use OpenFilePath, can you explain why you feel it isn't going to help?
tzuk

lwc
Posts: 332
Joined: Tue Dec 19, 2006 6:37 am

Post by lwc » Tue Mar 04, 2008 3:55 pm

Maybe you can workaround that using OpenFilePath settings that will be limited to the program that you're running via AutoExec?
No, because the program I'm running is CMD - as I wrote above, in order to duplicate sandboxes.

Duplicating sandboxes is the reason why it's needed.

tzuk
Sandboxie Founder
Sandboxie Founder
Posts: 16076
Joined: Tue Jun 22, 2004 12:57 pm

Post by tzuk » Tue Mar 04, 2008 4:02 pm

I still don't understand. What's the problem? Can't you write a batch file that will copy anything from (OtherSandbox)\drive\c\* to c:\
and then (OtherSandbox)\drive\d\* to d:\
and so on?
tzuk

lwc
Posts: 332
Joined: Tue Dec 19, 2006 6:37 am

Post by lwc » Tue Mar 04, 2008 4:27 pm

I've tried it and the xcopy kept failing. Also, since it's internal, how will I copy the registry settings that Sandboxie saves as files?

If you saw what I did with "Delete Command", then you know how easy it is with an external command (especially when you know about %A :wink: ).

tzuk
Sandboxie Founder
Sandboxie Founder
Posts: 16076
Joined: Tue Jun 22, 2004 12:57 pm

Post by tzuk » Wed Mar 05, 2008 6:17 am

I already described how to use registry export/import functions to populate the sandboxed registry. As for XCOPY, I really see no reason why it shouldn't work. So as I said earlier, I still don't see a reason to add an unsandboxed AutoExec, just because you are having some small problem with XCOPY that you have not yet resolved.
tzuk

lwc
Posts: 332
Joined: Tue Dec 19, 2006 6:37 am

Post by lwc » Wed Mar 05, 2008 7:55 am

It's really not the same to xcopy multiple folders + exporting registry + importing registry as opposed to just use a single (external) command.

In any case, please move this topic into feature request. I've changed the subject of this topic to reflect Sandboxie currently doesn't have such a thing. Thanks.

lwc
Posts: 332
Joined: Tue Dec 19, 2006 6:37 am

Post by lwc » Thu Feb 04, 2010 9:44 am

I was thinking about this lately because I have a 130 Mb sandbox (which means 260 Mb when resorting to "Delete Command").

You said to use OpenFilePath, but keep in mind I need to copy RegHive & RegHive.LOG. Besides, doesn't Auto Exec only run after they're already created?

Another issue is that environmental variables only work for settings and not for the sandbox itself. So "%Sandbox%" is not useable for Auto Exec.

I just want to copy mysandbox_dummy into mysandbox before mysandbox starts. An external Auto Exec would just be "copy mysandbox_dummy mysandbox". Yes, I realize I can start Sandboxie through a third party (e.g. a batch file), but it'll never be the same thing. If Sandboxie already has the foundation for the external "Delete Command", why not doing the same thing for sandboxes' restarts (i.e. an external "Auto Exec")?

tzuk
Sandboxie Founder
Sandboxie Founder
Posts: 16076
Joined: Tue Jun 22, 2004 12:57 pm

Post by tzuk » Thu Feb 04, 2010 10:25 am

You can't copy over the reghive files of a sandbox if your program is running in that same sandbox. You will have to use registry import/export commands to populate the sandboxed registry.

I could add %sandbox% for AutoExec processing, but not external AutoExec, because it wouldn't work with forced programs, whereas the current form of AutoExec would work just fine.

Why do you say that a batch file would "never be the same thing" ?
tzuk

lwc
Posts: 332
Joined: Tue Dec 19, 2006 6:37 am

Post by lwc » Thu Feb 04, 2010 11:40 am

So what I mean is something that runs before the sandbox even starts. Maybe "Pre Exec" would be a better a name for it. It does what it does before Sandboxie even has anything to do with the sandbox. Kind of like the difference between autoexec.bat and Programs=>Startup.

A batch file would mean:
1) An intimidating black screen.
2) It would have to be carried arround with the Sandboxie installation.

BTW, I've noticed Delete Command doesn't support any internal variables except "%sandbox%" (which, as you know, is not the original "%sandbox%"). It also seems to do various minor things like taking the read-only flag off the root folder and unhiding RegHive.LOG. I was thinking to use Toucan - a portable free utlity that mirrors only changes - and then rename the special "%sandbox%" back to its name. Alas, the aforementioened small changes probably mean it's not a good idea. It would have only worked if there was a "Post Exec" command that doesn't necessarily involve deletion.

tzuk
Sandboxie Founder
Sandboxie Founder
Posts: 16076
Joined: Tue Jun 22, 2004 12:57 pm

Post by tzuk » Fri Feb 05, 2010 12:43 pm

lwc, I am not sure where you're going with this. To whom are you distributing (or are you planning to distribute) installations of Sandboxie, who would be intimidated by the black screen?
tzuk

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest