我粘贴两小段代码
System.Diagnostics.Process[] processOnComputer = System.Diagnostics.Process.GetProcesses();
foreach ( System.Diagnostics.Process p in processOnComputer )
{
System.Console.WriteLine(p.ToString());
}
Console.ReadLine();
System.Diagnostics.Process[] process = System.Diagnostics.Process.GetProcessesByName("进程名称");
foreach ( System.Diagnostics.Process p in process)
{
p.Kill();
}
分别负责实现读取进程和杀死进程,其他都没用什么了