'How can I create a windows application that should run with admin rights in .Net C# without prompting UAC again and again?
I am developing a windows application in .Net C#. The application is using some third party drivers which requires admin rights for it's execution. I know we can use app manifest and provide the required privilege there, but it prompts UAC everytime when user runs the application which is annoying for the user. So, Is there any other way so that we can run the application without prompting the user or it only prompts once and when user runs the application next time it should run with admin rights.
Thanks
Solution 1:[1]
This task can be delegated to a shortcut to an executable file in the properties of which the "Run as Administrator" flag is set.
Learn more about programmatic process privilege elevation here.
P. S. Applications that can run themselves as admin without asking administrator rights exists and are called rootkits, backdoors or trojans. Such programs are malicious. Writing them is a tricky and sometimes illegal.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | ng256 |
