System.Diagnostics.Process[] processList = System.Diagnostics.Process.GetProcesses();
foreach (System.Diagnostics.Process process in processList)
{
if (process.ProcessName.ToUpper() == "WINRAR")
{
MessageBox.Show("Y");
process.Kill(); //结束进程
}
}
System.Diagnostics.Process[] processList = System.Diagnostics.Process.GetProcesses();
foreach (System.Diagnostics.Process process in processList)
{
if (process.ProcessName.ToUpper() == "WINRAR")
{
MessageBox.Show("Y");
process.Kill(); //结束进程
}
}