winform 退出进程C#
System.Diagnostics.ProcessStartInfo p = null;
System.Diagnostics.Process Proc;
string path = System.IO.Directory.GetCurrentDirectory();
if (!File.Exists(path + "\\gmz.exe"))
{
MessageBox.Show(System.IO.Directory.GetCurrentDirectory() + "\\empty.exe不存在");
}
p = new ProcessStartInfo(path + "\\empty.exe", "Hisign.ACS.Main.exe");
p = new System.Diagnostics.ProcessStartInfo(path + "JWMJJ.exe");
p.WorkingDirectory = path;//设置此外部程序所在windows目录
p.WindowStyle = ProcessWindowStyle.Hidden;//在调用外部exe程序的时候,控制台窗口不弹出
//如果想获得当前路径为
Proc = System.Diagnostics.Process.Start(p);//调用外部程序
System.Threading.Thread.Sleep(100);