Need to elevate permissions without UAC pop ups

前端 未结 4 1066
野的像风
野的像风 2020-12-20 22:13

I have an application which is a launcher for another application (my main one). The launcher goes to an FTP server, downloads updates and installs them. However, the update

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-20 22:33

    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.

提交回复
热议问题