Results 1 to 4 of 4

Thread: [vb6 + api] kill a shell executed tree

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2005
    Posts
    117

    Question [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?

  2. #2
    Lively Member
    Join Date
    Jan 2006
    Posts
    114

    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

  3. #3
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: [vb6 + api] kill a shell executed tree

    You can use SendKeys. For example... if you want to close the Notepad...

    VB Code:
    1. AppActivate "Notepad" 'this is title of the app
    2.     SendKeys "=", True
    3.     SendKeys "%{F4}", True
    ...this closes it.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Aug 2005
    Posts
    117

    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
  •  



Click Here to Expand Forum to Full Width