/// <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);
     }
 }
예제 #2
0
 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);
        }
예제 #4
0
 public WizardForm()
 {
     InitializeComponent();
     canElevate = UACHandler.IsUserInAdminGroup() && UACHandler.IsUacEnabled();
     isElevated = canElevate && UACHandler.IsRunAsAdmin();
 }