0

I'm looking for a way to see if a process starts/triggers other processes.Google chrome is a good example for what i'm looking for:

Process p = new Process();
p.StartInfo.FileName = "chrome.exe";
p.Start();

When starting chrome it will have a PID but it seems like this process just triggers other (background) processes and then ends immediately (no PID reference?).

I could assume that any 'chrome' process with a StartTime > p.StartTime could be part of what is triggered but I don't think this is the best way to go. This process could for example start other processes with different names.

Is there a way to 'follow' everything what is triggered from the first process start?

jperez
  • 1,020
  • 1
  • 10
  • 25
  • 1
    May be you are interested in something like this : http://stackoverflow.com/questions/545449/process-tree – Kavindu Dodanduwa Mar 04 '15 at 14:53
  • 1
    Just snap the Lego pieces together. [This one](http://stackoverflow.com/a/1986856/17034) and [this one](http://stackoverflow.com/a/2533287/17034). – Hans Passant Mar 04 '15 at 15:53

1 Answers1

1

You can P/Invoke NtQueryInformationProcess API function to find processes by the parent handles.

sithereal
  • 1,656
  • 9
  • 16
  • possibly helpful: http://stackoverflow.com/questions/394816/how-to-get-parent-process-in-net-in-managed-way – sithereal Mar 04 '15 at 14:45