![]() |
| [.06] Terminate programs after exiting from a script |
|
tzuk
|
You can use the parameter /wait in Start.exe, this will cause Start.exe to suspend until the program ends.
You would need to change your desktop shortcut so it starts a batch script that runs outside the sandbox: NewScript.bat:
|
||||||||||||||
|
_________________ tzuk |
|||||||||||||||
|
Max100
|
Unfortunately it doesn't work... in this case cmd window exits immediately without open nothing. But if I omit last line in your script, script runs ok, opening start.bat in Trash sandbox. |
||||||||||||||||
|
|
|||||||||||||||||
|
tzuk
|
OK, then try this instead of the first line --
The first /wait tells cmd.exe that you want to wait for Start.exe to finish. The second /wait tells Start.exe that you want to wait for start.bat to finish. |
||||||||||||||
|
|
|||||||||||||||
|
Max100
|
I've tried it now, but this line doesn't work either. If I remove the first start /wait it works as usual, but without close all sandbox programs. |
||||||||||||||||
|
|
|||||||||||||||||
|
tzuk
|
Alright, how about if you set CMD.EXE (which is the program running your "c:\svabi\program\start.bat" script),
as a leader program in the sandbox? That means that when the script ends and CMD.EXE exits, all the other programs in the sandbox would be terminated as well. Could this be an easier way to do what you need? Sandbox Settings > Program Stop > Leader Programs |
||||||||||||
|
|
|||||||||||||
|
Max100
|
Including CMD.exe in Leader Programs list, the program is opened, but it will be closed after 1 second. No time to do something. However I solved this problem in a similar way, maintaining the usual shortcut:
I dscovered that two processes remain in background after that I close the program. So I went to program settings (right click on each of two processes) and I checked the first highlighted option (in program settings window)
These two entries will be added in Lingering Programs list, so if you add them from there it's the same: http://www.sandboxie.com/index.php?ProgramStopSettings Now I have just a question.... is it possible to terminate also sandboxie control at the end of script? /nosbiectrl doesn't work for me if I try to use the previous code in this post. But if the workaround for this other thing is to run a .bat in a .bat, then I'd say... "no, thank you, it's good enough." |
||||||||||||||||
|
|
|||||||||||||||||
|
tzuk
|
Should be simpler this time. Something like --
|
||||||||||||||
|
|
|||||||||||||||
|
Max100
|
This workaround, necessary to close unneeded programs, doesn't work anymore starting from 3.69.03 version. Current 3.69.04 version is also affected. In all versions before 3.69.03 Lingering Programs feature worked correctly with these steps. If you need other instructions, just ask. |
||||||||||||||||||
|
|
|||||||||||||||||||
|
tzuk
|
Ah, this probably has to do with the change I did to address this problem report:
http://www.sandboxie.com/phpbb/viewtopic.php?t=12868 Thanks for catching this so quickly. I'll see what I can do about it, I'll let you know in a couple of days. |
||||||||||||
|
|
|||||||||||||
|
tzuk
|
I re-read the topic but I'm not sure I understand how you have it set up exactly.
Can you tell me which LingerProcess and LeaderProcess settings you have in effect? |
||||||||||||
|
|
|||||||||||||
|
Max100
|
I don't use any LeaderProcess settings. These executables are started together with the main software (ca-main.exe). Ca-main.exe is called from my batch file. |
||||||||||||||||
|
|
|||||||||||||||||
|
tzuk
|
I'm sorry but I remain just as confused as before, and don't have a clue what I have to check.
Please pretend that nothing has been posted in this topic, and that you have to make a descriptive first post, which actually explains the problem. Because really, I have no idea what is the problem. |
||||||||||||
|
|
|||||||||||||
|
Max100
|
I suggest you to read these steps carefully before applying them, so you can't make mistakes. 1) Install Sandboxie 3.69.02 2) Install this in a sandbox of your choice (press Avanti>, then Install and Fine). 3) Install this in the same sandbox as before (press Avanti, again Avanti, then Install. Before to press Fine, please unselect the checkbox "Eseguire Carpe-PC" .) 4) Create a file named "start.bat" with these lines:
5) Copy start.bat in c:\svabi\program\ folder. 6) Add these lines to the end of your sandbox configuration:
7) Open start.bat from the sandbox. You will see a window with multiple radio buttons. Choose "Cittadino con Pin" radio button. Press Continua, and again Continua. 7a)Before to do anything, open separately Sandboxie control and keep it open without closing it. You will see 3 processes as in this image. 8)Now you can interact with the two windows on the screen started from the batch file. Close both of them using the typical red close button in top-right corner of title bar. When required, press "Si" button to confirm this operation. 9) Immediately after pressing"Si" button, take a look at Sandboxie control (as in step 7a), and you will see mflmma.exe & mflmwin.exe closed together with the main executable ca-main.exe. 10) Install any Sandboxie version after 3.69.02, and you won't see mflmma.exe & mflmwin.exe closed correctly, because in this case they remain loaded in background. |
||||||||||||||||||
|
|
|||||||||||||||||||
|
tzuk
|
Thanks for the detailed explanation! I'll see what I can do.
|
||||||||||||
|
|
|||||||||||||
| [.06] Terminate programs after exiting from a script |
|
||
|


Use the RSS feed to watch this topic for replies