Jump to content

Child or parent process


mocro
 Share

Recommended Posts

Hello,

I have searched all the documentation and these forums but I can't manage to find anything about determining how to obtain the pid of all child process belonging to a running program.

I haven't written any code but heres a short explanation.

If I have an autoit wrapper program "foo.exe" with the following code

Run("bar.exe")

And I have an install file called "bar.exe" (not packaged by me) which opens up a series of unknown child processes. Is there a function that I can run on "foo.exe" that will tell me that "bar.exe" and its subsequent child process are all childs of "foo.exe".

Or inversely, is it possible to obtain the list of all parent processes given I know one of the child processes of "bar.exe"?

I was looking at the software "Sysinternals Process Explorer" however there doesn't look like a way I can automate it via the command line.

Any help would be greatly appreciated?

Thanks in advance

Link to comment
Share on other sites

  • 1 year later...

I need this too, but I want only one process tree of one process. Isn't there some function in autoit to see child processes of a process with some PID? It would be easier, then somehow parsing output from pslist...

Hmm maybe I will not need this - I use runwait("taskkill.exe /t /f /pid "&$pid) which kills process tree.

Edited by LoWang
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...