tags:

views:

73

answers:

2

Hi, how can i kill some active windows processes by searching with their .exe filenames in C# or c++.net

+2  A: 

You can use Process.GetProcesses() to get the currently running processes, then Process.Kill() to kill a process.

driis
Process.GetProcessesByName would simplify this.
consultutah
Thanx so much..
Aliasghar Yaghoobzadeh
+4  A: 

Quick Answer:

foreach (var process in Process.GetProcessesByName("whatever.exe"))
{
    process.Kill();
}
consultutah
Thanx so much..
Aliasghar Yaghoobzadeh