Jungle Wang

Jungle Wang

  • 1.6k
  • 12
  • 916

How to enhance the admin permission of buttons in WPF

Jul 25 2023 7:25 AM

In the WPF program, if the entire program requires admin permission, we can set the app. manifest file to pop up UAC when the program starts, allowing the entire program to have admin permission,
However, in some cases, it is not necessary for the entire program to have admin permission, and only some buttons need to have admin permission.
The usual method is to add a "shield" icon to the button, and then pop up UAC. If there is no need to restart the current program at this time, how can the button have admin permission?


Answers (1)