Need to elevate permissions without UAC pop ups

Doing so would violate the basic principle of User Access Control.

There is no way to elevate permissions while avoiding the prompts, by design. If there was a way to do this, UAC would become useless.


That being said, you could try to design around the issue. Instead of making your program a startup/system tray application, you may want to consider making a windows service that does the update. This could run as an administrator on boot (instead of login), and it would already run with elevated permissions.

If you need a system tray application, it could be a separate app that "talks" to the service.


The whole point of UAC is that apps can't make priveleged changes without the user's approval. Rather than attempting to auto-update your app, perhaps you could simply let the user know that an update is available, and wait for them to ask for it to be updated (at which point the UAC prompt will be expected, as many apps update this way).

Tags:

C#

Uac