Given a process can I get the child or parent processes using C#? -
04-20-2004
, 10:01 PM
Given an instance of System.Diagnostics.Process, how can I get the parent process
o
Given an instance of System.Diagnostics.Process, how can I get the child processes
For example, I start a process which executes a script that starts a java program
System.Diagnostics.Process proc = System.Diagnostics.Process()
proc.StartInfo.FileName = "test.bat"
proc.Start()
test.bat contains
java testprogra
so proc.Start() starts "test.bat" which starts java. I want to end that specific java program given the process information of test.bat
Is there a way to do this in C# or .NET libraries
Thank you |