We are doing a minor upgrade for our product and wanted to confirm below thing related to components handling in minor upgrade:
I do not want some components installed on system after minor upgrade. So, I have removed those components from “Setup Design” view. Though, I can still see the components in Components view with RED exclamation mark showing that they are no more part of any feature. Installshield recommends Components should not be removed from Product in minor upgrade.
- Is it fine? Or, will it add some risk to the upgrade or uninstall?
- Components are still visible in red exclamation in Components view. Does that mean my Product still has Components and I am safe to remove those components from Setup Design view?
There are multiple layers here. Fundamentally, removing components in a minor upgrade is not allowed by Windows Installer (see MSIENFORCEMINORUPGRADERULES or Major Upgrade vs. Minor Upgrade vs. Small Update). The result is typically that the data in that component is orphaned on the machine; the minor upgrade doesn't remove the data, but it does remove Windows Installer's record of the data.
Some people recommend getting the desired effect of removing a component in a minor upgrade by using the component setting
Reevaluate Condition
. the default is No, but if you set this to Yes and provide a falseCondition
such as0
, the minor upgrade can remove the component's data. (You can further couple this with an empty file replacing the contents of any files that were in the component to cut down on your installation's size. Change only the files' contents, or Windows Installer will be unable to remove the obsoleted files.)Finally, removing a component from a feature does not remove it from your project, although when the component is no longer part of any features, the build will exclude it from the resulting .msi file. So when you're ready to change to a major upgrade, you should remove the component from your project entirely; until then you should keep the component.