views:

394

answers:

2

I'm using InstallShield 2010 Express to install a .NET WinForms app. The latest InstallShield project is a major upgrade, so I've used the Upgrade Paths section to allow upgrades from earlier versions of my app.

The problem is that config settings made during the initial install (written to Program Files\MyCompany\MyApp\myapp.exe.config) are being overwritten when installing the latest upgrade. This means that the user has to make all of the config settings again - not good.

In the InstallShield project, myapp.exe.config is set to use Windows Installer Versioning Rules. I've even tried setting the create/mod date of myapp.exe.config very old (1/1/1999) so that it shouldn't overwrite the file on the target system.

Other than this the installer works fine. Any ideas how I can prevent this file from being overwritten?

thanks

A: 

Doesn't Installsheild have a "before_install" script section? You could copy the existing config file and once the installation is complete overwrite the new one.

Spencer Ruport
Yes that would be possible however I was hoping that Windows Installer would handle this itself. In the documentation it states:"Date—If the modified date of a file already present on the target machine is later than the creation date of that file, the file is not overwritten. This rule protects user preference files from being wiped out during an upgrade or reinstallation."
Richard Bysouth
Not really sure. :( I've run into a few quirks in my limited experience with installshield. Perhaps this is that?
Spencer Ruport
A: 

Richard,

I'm having the same problem. Did you figure it out? Anyone ideas?

Thanks

HiUnfortunately not. I've been backwards and forwards with Installshield (Acresso) support on this and they have no solution for this. I can actually get it to work when installing in attended mode, but not when running in silent (unattended) mode.
Richard Bysouth