Close all application using c#
C#
21
Posts
4
Posters
0
Views
1
Watching
-
Hi, first you could use
System.Diagnostics.Process.GetProcesses();
to enumerate all running processes. But closing them could be difficult because you have to distinguish between system processes and application processes. A better way is to get all top-level applications (like the task-manager) and close them. Have a look at this link http://www.neowin.net/forum/lofiversion/index.php/t369213.html[^]. Regards Sebastian
It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.
{
Process\[\] processes = Process.GetProcessesByName("notepad"); foreach (Process process in processes) { process.Kill(); } }
modified on Thursday, May 13, 2010 1:08 AM