/// <summary> /// Uacs the elevated update window text. /// </summary> /// <param name="owner">The owner.</param> /// <param name="extraTitleText">The extra title text.</param> /// <param name="bracketType">Type of the bracket.</param> /// <param name="administratorText">The administrator text.</param> public static void UACElevatedUpdateWindowText(KryptonForm owner, string extraTitleText = "", BracketType bracketType = BracketType.CURLYBRACKET, string administratorText = "Administrator") { if (UACHandler.GetHasElevateProcessWithAdministrativeRights()) { UpdateWindowText(owner, extraTitleText, bracketType, administratorText); } }
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { UACHandler.RestartElevated(); }
private void KryptonUACElevatedButton1_Click(object sender, EventArgs e) { string appPath = Path.GetFullPath(Application.ExecutablePath); UACHandler.ElevateProcessWithAdministrativeRights(appPath); }
public WizardForm() { InitializeComponent(); canElevate = UACHandler.IsUserInAdminGroup() && UACHandler.IsUacEnabled(); isElevated = canElevate && UACHandler.IsRunAsAdmin(); }