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 { }
        }
原文地址:https://www.cnblogs.com/HuangLiming/p/15005327.html