Sign in to follow this  
Followers 0
mocro

Child or parent process

4 posts in this topic

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

Share this post


Link to post
Share on other sites



I'm fiddling around with PsList at the moment trying to get it to output the information that you need. Perhaps its -d or -t switches may be of use to you?

Share this post


Link to post
Share on other sites

Wow that was fast. Thats exactly what I was looking for. I can't believe I missed it on the sysinternals website. I think -t switch would suffice.

Thanks LxP

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0