private bool CloseProcess(string CloseProcessName) { try { //根据进程名称,获取该进程信息 Process[] MyProcessS = Process.GetProcessesByName(CloseProcessName); foreach (Process MyProcess in MyProcessS) { MyProcess.Kill(); MyProcess.WaitForExit(); MyProcess.Close(); Thread.Sleep(10000); } } catch (Exception) { return false; } return true; } /// /// 创建进程 /// public bool StartProcess(string StartProPath) { try { Process TheStartProcess = Process.Start(StartProPath); } catch (Exception) { return false; } return true; } //csharp/6273