C# 重启程序
作者:互联网
Global.RootStart("peed.exe", "StartByGuard");
public static void RootStart(string exepath, string args) { ProcessStartInfo startInfo = new ProcessStartInfo(exepath, args); startInfo.UseShellExecute = true; startInfo.CreateNoWindow = true; startInfo.WindowStyle = ProcessWindowStyle.Hidden; startInfo.WorkingDirectory = Directory.GetParent(exepath).ToString(); startInfo.Verb = "runas"; //设置启动动作,确保以管理员身份运行 try { Process.Start(startInfo); } catch { } }
标签:ProcessStartInfo,string,C#,重启,args,程序,RootStart,startInfo,exepath 来源: https://www.cnblogs.com/HuangLiming/p/15005327.html