Пример #1
0
        public static void Restart(bool as_administarator = false)
        {
            ProcessStartInfo psi = new ProcessStartInfo();

            psi.UseShellExecute  = true;
            psi.WorkingDirectory = Environment.CurrentDirectory;
            psi.FileName         = Application.ExecutablePath;
            if (as_administarator)
            {
                psi.Verb = "runas";
            }
            Process.Start(psi);
            ProcessRoutines.Exit();
        }