mocro Posted September 18, 2005 Share Posted September 18, 2005 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 More sharing options...
LxP Posted September 18, 2005 Share Posted September 18, 2005 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? Link to comment Share on other sites More sharing options...
mocro Posted September 18, 2005 Author Share Posted September 18, 2005 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 Link to comment Share on other sites More sharing options...
LoWang Posted August 20, 2007 Share Posted August 20, 2007 (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 August 20, 2007 by LoWang Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now