|
-
Aug 18th, 2006, 01:01 AM
#1
Thread Starter
Lively Member
[vb6 + api] kill a shell executed tree
so... my program shell executes another (not mine) program which in turn opens a third program and then exits itself...
now i only have program 1 and 3 open... no 2
how do I make 1 kill 3 without any knowlegde of 2 or 3 beforehand... i.e. 2 is a generic launcher, three is a generic launchee, and what precise programs they are can change without notice.
??
the most generic form of what i'm looking to do is to kill all processes that occur as a result of program 1... even if some of those processes have already terminated.
any ideas?
-
Aug 18th, 2006, 01:04 AM
#2
Lively Member
Re: [vb6 + api] kill a shell executed tree
http://www.vbforums.com/showpost.php...97&postcount=2
you can reference to that to find your exe in the list of running ones, and from there get the handle on it
-
Aug 18th, 2006, 01:39 AM
#3
Re: [vb6 + api] kill a shell executed tree
You can use SendKeys. For example... if you want to close the Notepad...
VB Code:
AppActivate "Notepad" 'this is title of the app
SendKeys "=", True
SendKeys "%{F4}", True
...this closes it.
-
Aug 18th, 2006, 10:38 AM
#4
Thread Starter
Lively Member
Re: [vb6 + api] kill a shell executed tree
I know how to close a known exec... i'm looking to close all execs that open as a result of an exec, wqithout knowing anything about the exec beforehand... i.e. if the exec is only a launcher for another prog.. like with portable firefox, i want to kill the results of the program (firefox here) not just the program (portablefirefox here) which will already have closed... firefox is only an example, i need it to work for any exec opened, and kill processes that don't necessarily have frames
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|