cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
RichardBysouth
Level 2

Prevent .NET config file being overwritten during install

Hi

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
Labels (1)
0 Kudos
(1) Reply
Alpesh
Flexera Alumni

Since it is a Major Upgrade, it is going to remove the files installed by the earlier version. You need to make that file permanant in the earlier version. The option now you have will be to perform a backup of the file through a custom action and later restore it.
0 Kudos