2

When I run new installation over existing installed product the installer does not overwrite non EXE and DLL files. For EXE and DLL I can setup version number which defines whether the files will be replaced. But this is not possible for configuration files that contain plain text.

Is there anyway to force the installer replace all files?

Setting DetectNewInstalledVersion to True or False does not have any effect.

RemovePreviousVersions is set to True

PhilDW
  • 20,260
  • 1
  • 18
  • 28
sergman
  • 171
  • 1
  • 2
  • 12

1 Answers1

0

The file replacement rules for Windows Installer do not allow user-modified files to be replaced:

https://msdn.microsoft.com/en-us/library/windows/desktop/aa370531(v=vs.85).aspx

The basic problem is that you don't really want a product to install a database file, fill it with data and then destroy it with a product upgrade.

This is most likely what's happening. If you log the upgrade with a command like:

msiexec /I [path to upgrade MSI] /l*vx [path to text log file]

and then search for the file name it will tell you why it didn't replace it.

Another possibility is that the file has been marked as NeverOverwrite in the Component table of the MSI file. This seems unlikely in your case because Visual Studio setups do not provide support for this in the IDE. This applies to the component after it has been installed and cannot be undone - it is a system setting, not an MSI setting.

PhilDW
  • 20,260
  • 1
  • 18
  • 28