简体   繁体   中英

How to implement Auto-Updates for my Application without Administration Rights

I maintain a large Windows C++ Application that installs with nullsoft nsis . Installation is quick and simple (less than 1 minute).

Some users in large companies do not have administration privileges and they have to order costly 3rd party services to update their installation. Therefore some of them only update once a year, while we ship every month and sometimes fix important bugs etc.

So we are thinking about automatic updates that do not require elevated administration rights. Mozilla and Adobe do this as well as others. As far as i can see an the Mozilla XULRunner site they install a service which then in turn can run a update without forcing the user to enter a administration password. I also found Googles Omaha but it is not clear about the administrator privileges ("Support for restricted user environments; for example, users without administrator privileges "..."This requires the user has administrator privileges.").

So far i have not found exact answers to these questions:

  • What steps do we have to take in order to establish such a mechanism?
  • Can we keep on with nsis?
  • What server infrastructure is requested?

Your application should check for updates on your server/website and get the download link. This should be pretty easy if you maintain a text file/page with fixed hyperlink. This hyperlink can be hard-coded in your application. If it detects a version newer than the current version then download the files. Along with these files there should be instructions for which files to replace and Which files are to be added at what location, etc.

Now whether or not you need admin privileges depends on where you need to place the updated files. If the target folder has some restrictions then it would be difficult to update in the same session. So you may have to launch a dummy exe which asks the user for admin privileges during startup. Now you can copy the updated files to your desired location without much pain.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM