A lot of times, we don’t want installed files to be overwritten, removed or uninstalled. There are different ways of doing this depending on your requirements. There are a variety of scenarios where files can be overwritten. A common one is where an old installation is being overwritten by a new installation, but the new installation is not an upgrade (this situation is not a best practice method). Or, if you are following best practices, you are actually using an upgrade installation (the preferred method of updating an older version).
Whatever the scenario, let’s look at a few examples of how we can accomplish this:
1) Set a Component’s Permanent and Never Overwrite properties to Yes. When you do this, the files in the component will not be overwritten or removed under any scenario. Okay, you can remove them manually, but I’m talking about them not being removed in an installation/uninstallation scenario.
2) Copy Files to Temporary Folder at Beginning of an Install, Do Main Install, Then Copy Files Back at End of the Install. This is good if you are doing an upgrade. Or you are doing the non-best practice of installing a new version over an old version (and not using an upgrade installation).
3) Rename Files to Another Name. This works because the renamed files will not have been installed in the initial installation, therefore they won’t be uninstalled.
4) Copy Files to Another Name. This works because the copied files will not have been installed in the initial installation, therefore they won’t be uninstalled.
5) Do a Minor Upgrade Where the Only Thing Changed is the Component’s Permanent and Never Overwrite Properties Being Set to Yes. This idea was suggested to me one time by InstallShield technical support. I have to say I had never thought of this and it is a creative way of solving the problem. If you don’t follow the logic, let’s say you installed a product that has a couple of files that are important to the product. Perhaps they contain user settings. Time passes and you wish you had set the component’s properties for these files to Permanent and Never Overwrite in the original installation. You can then create a minor upgrade where the only thing changed is that component’s properties being set to Permanent and Never Overwrite.
Those are some suggestions for you to use next time you are faced with this situation.