How should I implement an auto-updater?

后端 未结 16 1133
名媛妹妹
名媛妹妹 2020-12-04 06:11

Many programs include an auto-updater, where the program occasionally looks online for updates, and then downloads and applies any updates that are found. Program bugs are f

16条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-04 06:20

    One thing that hasn't really been mentioned is that you should seriously consider that the user running your program might not actually have sufficient privileges to upgrade it. This should be pretty common at least for business users, probably less so for home users.

    I'm always working with a (self-imposed) limited account for security reasons and it always pisses me off that most auto-updaters simply assume that I'm running as admin and then after downloading just fail and offer no other way of performing the update other than actually closing the program and running it again in an administrative context. Most do not even cache the downloaded update and have to do it all over again.

    It'd be much better if the auto-updater would simply prompt for admin credentials when needed and get on with it.

提交回复
热议问题