Hi,
I am trying to get all the processes running and kill them like this
foreach (Process process in Process.GetProcessesByName("Excel"))
{
process.Kill();
}
But the problem with this is that there may be processes that were not started by my application...
For example, I am running an application written in C# it initiates Excel processes, how can I collect only those Excel processes that were started by my application and kill only those no others!
Thanks in advance!
I am trying to get all the processes running and kill them like this
foreach (Process process in Process.GetProcessesByName("Excel"))
{
process.Kill();
}
But the problem with this is that there may be processes that were not started by my application...
For example, I am running an application written in C# it initiates Excel processes, how can I collect only those Excel processes that were started by my application and kill only those no others!
Thanks in advance!