start command line feature request

Ideas for enhancements to the software
Post Reply
swift20281

start command line feature request

Post by swift20281 » Sun May 31, 2009 3:11 am

I have an idea for the start command line. Could you add a new feature to make it possible to teminate an individual sandboxed program using the start command line, rather than having to teminate all of the programs running in a particular sandbox. I find it very useful.

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

Post by tzuk » Sun May 31, 2009 5:32 pm

You have TASKKILL for that, and it's already built into Windows.
tzuk

Guest10
Posts: 5124
Joined: Sun Apr 27, 2008 5:24 pm
Location: Ohio, USA

Post by Guest10 » Mon Jun 01, 2009 7:31 am

Personally, I have Task Killer sitting in my Windows tray area at all times.
One left-click brings up a list of programs and processes that can be killed. It's often easier than getting Windows Task Manager window to open.
Paul
Win 10 Home 64-bit (w/admin rights) - Zone Alarm Pro Firewall, MalwareBytes Premium A/V, Cyberfox, Thunderbird
Sandboxie user since March 2007

swift20281

task kill don't work

Post by swift20281 » Wed Jun 03, 2009 2:17 am

I can not use task kill because if I already have more than one of the same app running and I only want to teminate the one running in a particular sandbox. I cannot easy know which app is which in the task manger. I would like to be able to use batch files to speed this tedious task up so I need I a command to teminate a program running in a sandbox.

Buster
Posts: 2576
Joined: Mon Aug 06, 2007 2:38 pm
Contact:

Post by Buster » Wed Jun 03, 2009 3:14 am

I also consider that batch files speed up thing very much. But it´s necessary to have the required command line features to do the necessary tasks.

I think this is a good feature request.

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

Post by tzuk » Wed Jun 03, 2009 7:21 pm

You can use this batch script to kill a sandboxed program by name. It's a little slow but it gets the job done.

Code: Select all

@echo off
if %1x==x goto :usage
set BOXNAME=DefaultBox
if %2x==x goto :skipboxname
set BOXNAME=%2
:skipboxname
for /f "skip=1" %%p in ('"C:\Program Files\Sandboxie\Start.exe" /box:%BOXNAME% /listpids') do call :subproc1 %1 %%p
:end

:subproc1
if %2x==x exit /b
for /f "skip=3" %%i in ('tasklist /fi "pid eq %2"') do call :subproc2 %1 %2 %%i
exit /b

:subproc2
if not %1==%3 exit /b
echo Killing pid %2 process name %3
taskkill /pid %2 /f
exit /b

:usage
echo Usage: kill ProcessName [BoxName]
echo Example 1:  kill iexplore.exe
echo Example 2:  kill iexplore.exe TestBox
tzuk

swift20281

don't think it works

Post by swift20281 » Fri Jun 05, 2009 1:44 pm

thanks for writting the scirpt. but I don't think it works, unless I am doing something wrong. I copied the scirpt and saved it as I batch file. I then put it in the windows/system32 directory I run internet explorer in one of my sandbox's and this is what I typed this into command prompt 'name of the scirpt" kill iexplore.exe "name of sandbox"' sandboxie start errors with this message 'invaild box name iexplore.exe/listpids and command prompt errors with this 'ERROR the search filter could not be recognized' any ideas

Ruhe
Posts: 803
Joined: Thu Jul 03, 2008 8:56 am
Location: Germany
Contact:

Post by Ruhe » Fri Jun 05, 2009 2:52 pm

IE will be closed with

Code: Select all

E:\>kill iexplore.exe iexplorer
Killing pid 2372 process name iexplore.exe
SUCCESSFUL: The process PID 2372 was killed
ERROR: The search filter could not be recognized
(translated from german outputs)

swift20281

sorry everyone it does work

Post by swift20281 » Sat Jun 06, 2009 2:46 am

sorry it does work the problem was when I saved the batch file I didn't call it kill I called it batch.bat. So when I run it it said the format for the command was 'kill process name [boxname]. What I did wrong was this I typed 'batch kill iexplore.exe iexplorer' because I didn't call the file kill and called it batch the command thought kill was the process to teminate and iexplore.exe was the sandbox it was running in. sorry again everyone and thanks tuzk for writting a great little script

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest