tags:

views:

92

answers:

3

I need to provide an update to application data as a download from a website. The update would actually just be the replacing of some data files with some updated ones.

The update, which I assume would be some sort of setup package type program, would need to be able to do the following:

  1. access the file system and registry to determine where files should be copied to
  2. supply the files to be copied
  3. provide strong security so the data files cannot be downloaded or used by the wrong people

What would be best way to achieve all of the above?

A: 

I would suggest to use either

These technologies are meant to distribute software over networks.

(I think that developing something similar yourself can turn to be something rather complicated.)

ewernli
A: 

There are a number of comprehensive update manager and delivery services available from commercial software vendors if you don't want to write something from scratch yourself.

Your choice will depend on your chosen language, existing setup methods, targeted operating systems and budget.

We just use standard MSI installers/upgrades and wrote our own update manager/update delivery service. You'll need to weigh up own resources and development expense to decide if it's worth purchasing a commercial product, or developing something in-house.

sascha
A: 

I've used AdvancedInstaller - a very capable free version is available. It is a fully-fledged MSI installer, so it can read/write to the registry and install files to "Program Files" that normally requires admin privileges. It also supports application updates out of the box. You can publish updates and have them automatically downloaded and installed.

As to security, this is not really the realm of an Installer but part of the webserver where you host the files. You could use a password protected folder, or for stronger prevention, client SSL certificates. The latter would work well with automatic updates.

An alternative is to string together a solution from a number of readily available components:

  • use a batch file to perform the download that is executed regularly. You can schedule batch files using the Windows Task Scheduler.
  • The batch file will use the Windows REG command to read values from the registry, and use those values to invoke rsync. rsync is a file synchronization command that can be run through ssh. If you configure ssh with public key authentication, you restrict access to specific clients of your choosing, while allowing automated access (no password required.) The key with rsync is that if the files are up to date, no download is performed.

This article explains how to sync files from a server to a notebook using rsync and ssh, and explains how to set up rsync and ssh using Cygwin.

See also

mdma
How does AdvancedInstaller compare to ClickOnce?
Craig Johnston
Advanced installer, a windows installer producer with some bells and whistles, is not quite as "turnkey" as ClickOnce. If you are using a .NET development environment, then use ClickOnce, since it accomplishes the same goals with some improvements. If you are not using .NET then AdvancedInstaller will be the next best thing. See http://msdn.microsoft.com/en-us/library/142dbbz4%28v=VS.80%29.aspx for a comprison.
mdma
Looking through the comparison list, it seems that ClickOnce has only limited registry access at install time. AdvancedInstaller may be the better option.
mdma

related questions