Uninstaller for Merge Modules and Multiple Products
InstallAnywhere 2024 R2
When developing an installer that installs multiple products (or uses merge modules), it is important to consider how the uninstallers for these products will work. Each uninstaller is tied to a certain product. It does this through its product code (which is defined in the General Settings view on the Project page).
InstallAnywhere offers various options for developing an uninstaller for a project that installs multiple products (or uses merge modules).
Separate Uninstallers
You can decide to have a separate uninstaller for each product. This is the easiest option.
If you choose this option, make sure that every product has a unique product code, and that the uninstallers install to unique locations.
One Uninstaller for Multiple Products (or Merge Modules)
You can choose to have one uninstaller that includes uninstallation logic for all of products. InstallAnywhere has the ability to merge the uninstallation logic from separate uninstallers. In order to create one merged uninstaller function for a group of separate products, follow these guidelines:
• | Every product must have the same product code. |
• | Each separate product should then be “demoted” to a feature of the parent product. |
• | The uninstallers for these separate projects must also share the same uninstaller name and uninstaller location. |
• | Every product that installs features will register its features with the uninstaller. |
The following is an example of creating one uninstaller for multiple products:
Item |
Description |
||||||
Product |
Acme Office Suite (ID: 97338341-1ec9-11b2-90e2-a43171489d33) |
||||||
Installer 1 |
Acme Word Processor and Acme Spreadsheet
|
||||||
Installer 2 |
Acme Slide Show
|
||||||
End Result |
Acme Office Suite uninstaller for Acme Word Processor, Spreadsheet, and Slide Show. |
Parent Uninstaller that Executes Sub‑Uninstallers
You can choose to produce a parent uninstaller that executes the other sub-uninstallers. This option is most similar to concept of merge modules that are used in the installer.
You can use the Execute Uninstaller action to cause the parent uninstaller to execute other uninstallers during uninstallation. The advantage of this technique is that is lets you separate your uninstallation logic. If you use this technique, you may want to use the InstallAnywhere variables $NEVER_UNINSTALLS_VM$ and $REGISTER_UNINSTALLER_WINDOWS$.
Uninstalling Merge Modules When Main Project is Uninstalled
For dynamic merge modules, you can specify that you want to implement a single uninstaller that uninstalls both your main project as well as the merge module simultaneously. To specify this option, select the Uninstall Merge Module when parent is uninstalled option on the Install tab of the Dynamic Merge Module customizer (Organization page > Modules view).
You can also specify this option for an individual merge module by selecting the Uninstall Merge Module when parent is uninstalled option on the Install Merge Module action customizer in the Install sequence.
Uninstalling Merge Modules During Upgrades
If your project includes one or more merge modules as well as upgrade support, the installer can directly handle upgrades of the merge modules—the uninstallation of the earlier versions of merge modules as well as the installation of the new version. To learn more, see Special Considerations for Upgrade Support.
See Also