根据不同需求,启动更新过后的程序
①关闭更新程序,启动主程序
1 System.Diagnostics.Process.Start(exePath + @"\GreenStarMES.exe");2 this.Close();
②启动主程序,不关闭更新程序,当主程序关闭时,同步关闭更新程序
1 System.Diagnostics.Process.Start(exePath + @"\GreenStarMES.exe").WaitForExit();2 this.Close();
本文共 292 字,大约阅读时间需要 1 分钟。
根据不同需求,启动更新过后的程序
①关闭更新程序,启动主程序
1 System.Diagnostics.Process.Start(exePath + @"\GreenStarMES.exe");2 this.Close();
②启动主程序,不关闭更新程序,当主程序关闭时,同步关闭更新程序
1 System.Diagnostics.Process.Start(exePath + @"\GreenStarMES.exe").WaitForExit();2 this.Close();
转载于:https://www.cnblogs.com/JoeyZJ/p/5653276.html