0

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

  • 1
    if your app needs admin-rights, you *have* to provide the appropriate credentials. That's the entire point of UAC. If you could bypass it, you could easily hack into every system with admin-rights. Never wondered why installing something on a windows-machine allways promts you for those credentials? – MakePeaceGreatAgain Feb 04 '22 at 14:05
  • If you are running a service than start the service with Admin rights. – jdweng Feb 04 '22 at 14:06

1 Answers1

0

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.

ng256
  • 84
  • 2