views:

119

answers:

1

We have developed a program which checks our web site to see whether or not a new version is available. When a new version is available, a download program starts and retrieves the files, then copies that whole folder on top of the source and restarts the program with the new version.

The problem is that when we run the program that second time, the software hasn't actually updated -- that is, the files just downloaded and copied have been reverted to their original versions.

Is there a way to prevent that? We usually use Setup and Deployment projects in .NET 2008 to build our application installers.

A: 

I think you may need to make sure the binary files that are getting updated are not key files in the installation. All binary files are key files by default. This essentially creates a unique registry entry for each file in your installation. Windows will monitor these files and copy back its cached copy of the files when any of them are deleted or changed.

I'm not sure how to make binary files not keyed from the deploy project. It's a file-by-file option in Installshield projects.

If you install a stub, or entry point for the application, with the installer and xcopy the rest of the dependencies, Windows Installer will not repair the installation when it's modified out of bounds.

Scott P