View Full Version : How can I Always Overwrite files?

07-05-2004, 02:38 PM
When I do a new install, or a major upgrade, I would like to always overwrite most files, regardless of date or version. But I do not want to always overwrite merge modules, etc, so I can't use REINSTALLMODE. Any other way to do this?

07-05-2004, 05:50 PM
Merge modules are merged into the main install when you compile, so you cannot just exclude merge module from being overwritten.

Windows Installer does not provided a flag to 'AlwaysOverwrite' so your best bet would be to either change the component GUID, and path, move RemoveExistingProducts down the sequence so that the old product is removed before the new files are added, or you could remove the old files with either a custom action or the RemoveFiles tables during upgrades.

07-19-2004, 10:23 AM
I think you can also use companion files to make sure that non versioned files are always overweritten.


07-19-2004, 05:52 PM
Yes, Barbara is correct, companion files will help you overwrite non-versioned files, but if the files have a different modified date to their created date, then using companion files will not help.