First of all, thank you for your great product.
I'm currently trying to make the "preserve file contents" feature to work, to no avail.
What I'm trying to do
I have a configuration file that I want to preserve between upgrades. This file is installed as its own component. In the properties dialog for this file, "preserve file contents" is checked and the condition is, for now, "1", meaning the file should always be preserved, whatever the uninstall mode is. (I'll change it to OLDPRODUCTS later once I got this working).
What happens
Every time I'm doing anything that uninstalls the old version (full uninstall or upgrade), the old file is deleted, then reinstalled (in case of an upgrade). It seems that the "preserve file contents" option is ignored.
What I tried
- I read both File Operations Tab and Prevent Repair or Uninstall. This second link makes me believe that something is wrong: the example uses REMOVE=ALL telling it can be used as an alternative to the Permanent flag. That's not what I observe at all. The file is always removed, whether the condition is REMOVE=ALL or even just 1. In contrast, the permanent flag always keep the file. (I can't use it since I ultimately will want a condition (upgrade only), the 1 and REMOVE=ALL were for testing the preserve file behavior).
- "Ensure that this file overwrites any installer target file" is unchecked.
- To ensure no other condition or property was interfering, I created a blank new project, added a single file, changed only its "preserve file contents" option, built and ran the project, installed, created a major upgrade and ran the upgrade. The result is exactly the same: the existing file is never preserved.
- If I check "never overwrite" in the corresponding component properties and perform an upgrade, the old file is still deleted, but the new file isn't installed, as if the check was correctly made before the deletion.
Windows 7 SP1 64 bit
Windows Installer 5.0.7601.17807
Advanced Installer 9.5 Trial
FOLLOW US
Get the latest news in Application Packaging