string processName = "sapisvr"; Process[] processes = Process.GetProcessesByName(processName); foreach (Process process in processes) { process.Kill(); }