ProcessStartInfo proc = new ProcessStartInfo(); proc.UseShellExecute = true; proc.FileName = Application.ExecutablePath; proc.Verb = "runas"; try { Process.Start(proc); } catch { // The user refused the elevation. // Do nothing and return directly ... return; } Application.Exit(); // Q
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)