Killing specific instances of external application

Help each other out

Killing specific instances of external application

Postby scalt on Tue Nov 07, 2006 4:20 pm

Hello

I would like to know if it's possible to kill a specific instance of an external application. I need to run a certain application many times concurrently and sometimes I need to kill a specific one.

The way I thought of doing this is by using the process Id (PID) of the applications, but is it possible to do this with xlobby?

Thanks
scalt
 
Posts: 75
Joined: Tue Dec 06, 2005 10:53 pm

Postby scottw on Tue Nov 07, 2006 5:04 pm

I use a bat file to kill all emulators I have open that is triggered via the stop button on a remote.

Here is what the batch file looks like:
Code: Select all
taskkill /f /im mamep.exe
taskkill /f /im stella.exe
taskkill /f /im Project64.exe
taskkill /f /im zsnesw.exe
taskkill /f /im zplayer.exe
taskkill /f /im epsxe.exe

I think you can use /PID and then the id instead of the /im that I use.
scottw
 
Posts: 774
Joined: Mon Feb 06, 2006 4:21 pm
Location: Glen Burnie, Maryland

Postby scalt on Tue Nov 07, 2006 7:28 pm

Is there a way to get the PID of the application when launcing it from Xlobby to be able to kill it afterwards

Here is what I want to do

execute : app.exe -op1 val0 -op2 val313 ->PID=1001
execute : app.exe -op1 val3 -op2 val353 ->PID=1002
execute : app.exe -op1 val1 -op2 val123 ->PID=1003
execute : app.exe -op1 val5 -op2 val357 ->PID=1004
execute : app.exe -op1 val7 -op2 val504 ->PID=1005

And the be able to kill for exemple the app.exe with PID=1002

Is this possible with xlobby?
scalt
 
Posts: 75
Joined: Tue Dec 06, 2005 10:53 pm

Postby scottw on Tue Nov 07, 2006 8:17 pm

Sorry that is a bit beyond me. Hopefully someone will jump in here and help you out. :(
scottw
 
Posts: 774
Joined: Mon Feb 06, 2006 4:21 pm
Location: Glen Burnie, Maryland

Postby dalanik on Tue Nov 07, 2006 9:57 pm

Only if you lounch it from i.e. XScriptNG pluginm that is, VB... You should then be able to get process ID and kill it, there should be plenty of code which demonstrates this on net, just google a bit and you'll find it....

D.
dalanik
 
Posts: 885
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic

Postby dalanik on Tue Nov 07, 2006 10:13 pm

here's a link how to do it in VB.NET...

http://www.buygold.net/v06n04/v06n04.html
dalanik
 
Posts: 885
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic