New topic: Shell.PID
<http://forums.realsoftware.com/viewtopic.php?t=26186> Page 1 of 1 [ 3 posts ] Previous topic | Next topic Author Message Carello Post subject: Shell.PIDPosted: Sat Jan 24, 2009 5:58 pm Joined: Sat Feb 02, 2008 7:21 pm Posts: 31 Location: Stockholm, Sweden I've run into a bit of a snag, my application launches one or more external applications using Shell.Execute (it's a console application), I then need to close/kill one or more of the applications launched and I figured it would be easy enough using the PID property of the shell, but this property never returns the process ID of the application launched, it always returns a seemingly random process ID of another running process. Isn't Shell.PID supposed to return the process ID of the process it has launced, or is the ID returned something completely different? I started by using the returned PID property of the shell, and used it to kill a process - this ended up in catastrophy most of the time, as it killed the entirely wrong process. I then tried using the Close() method of the shell, but the process kept on running after the shell was closed. So, my question is; how can I find out the correct process ID of a particular process that my application has launched, if say, it has launched 4 processes with the same process name and why isn't Shell.PID returning the correct process ID? What do I have to do to stop/close/kill a process launched by Shell.Execute? Top npalardy Post subject: Re: Shell.PIDPosted: Sat Jan 24, 2009 6:24 pm Joined: Sat Dec 24, 2005 8:18 pm Posts: 4319 Location: Canada, Alberta, Near Red Deer what platform are you on ? _________________ My web site Great White Software RBLibrary.com REALbasic learning Top Carello Post subject: Re: Shell.PIDPosted: Sat Jan 24, 2009 6:30 pm Joined: Sat Feb 02, 2008 7:21 pm Posts: 31 Location: Stockholm, Sweden Ah, sorry...forgot to mention that this is on Window XP/2003/Vista, using REALBasic 2007r5 and 2008r5.1. Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 3 posts ] -- Over 900 classes with 18000 functions in one REALbasic plug-in. The Monkeybread Software Realbasic Plugin v8.1. <http://www.monkeybreadsoftware.de/realbasic/plugins.shtml> [email protected]
