Trust No Program
Reply to topic
An external equivalent for "Auto Exec"
lwc


Joined: 19 Dec 2006
Posts: 299
Reply with quote
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 2:08 pm; edited 4 times in total
View user's profileSend private message
SnDPhoenix


Joined: 26 Dec 2006
Posts: 2694
Location: West Florida
Reply with quote
Maybe use a batch file, or code a AutoIt script to do what you want? Rolling Eyes
View user's profileSend private message
lwc


Joined: 19 Dec 2006
Posts: 299
Reply with quote
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.
View user's profileSend private message
tzuk


Joined: 22 Jun 2004
Posts: 15003
Reply with quote
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
View user's profileSend private message
lwc


Joined: 19 Dec 2006
Posts: 299
Reply with quote
Why not just an unsandboxed AutoExec? Just a "Startup Command" that will work like "Delete Command".
View user's profileSend private message
tzuk


Joined: 22 Jun 2004
Posts: 15003
Reply with quote
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?
View user's profileSend private message
lwc


Joined: 19 Dec 2006
Posts: 299
Reply with quote
Quote:
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.
View user's profileSend private message
tzuk


Joined: 22 Jun 2004
Posts: 15003
Reply with quote
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?
View user's profileSend private message
lwc


Joined: 19 Dec 2006
Posts: 299
Reply with quote
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 ).
View user's profileSend private message
tzuk


Joined: 22 Jun 2004
Posts: 15003
Reply with quote
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.
View user's profileSend private message
lwc


Joined: 19 Dec 2006
Posts: 299
Reply with quote
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.
View user's profileSend private message
lwc


Joined: 19 Dec 2006
Posts: 299
Reply with quote
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")?
View user's profileSend private message
tzuk


Joined: 22 Jun 2004
Posts: 15003
Reply with quote
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" ?
View user's profileSend private message
lwc


Joined: 19 Dec 2006
Posts: 299
Reply with quote
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.
View user's profileSend private message
tzuk


Joined: 22 Jun 2004
Posts: 15003
Reply with quote
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?
View user's profileSend private message
An external equivalent for "Auto Exec"
You cannot post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 2  

Use the RSS feed to watch this topic for replies
  
  
 Reply to topic  

Sandboxie is Copyright © 2004-2012 by Sandboxie Holdings LLC.  All rights reserved.
Sandboxie.com | Contact Author
This site has been viewed 208,384,813 times since June 2004