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
2010-07-27 15:45:58
Process.GetProcessesByName would simplify this.
consultutah
2010-07-27 15:50:02
Thanx so much..
Aliasghar Yaghoobzadeh
2010-07-27 16:03:00
+4
A:
Quick Answer:
foreach (var process in Process.GetProcessesByName("whatever.exe"))
{
process.Kill();
}
consultutah
2010-07-27 15:48:34