How to upgrade an older version of the package

As you build new versions of an installation package by using one tool or another, the new versions should be able to upgrade the older versions (remove them before the installation). Depending on the old package, there are three possible scenarios for upgrading it:

The old package is created with Advanced Installer

In this case, you can follow the steps explained in the Upgrades page. Note that you can choose between the "Automatically upgrade older product versions" and "Allow side by side installs of different product versions" options.

The old package is created with another tool and it is MSI-based

Since the old package is MSI-based, it most likely has an Upgrade Code. This code can be used in the "Upgrades" page in order to set the new package to upgrade the old one. With this method the old package is uninstalled automatically and silently right before the new installation starts.

NoteYou can add the "Upgrade Code" of the old MSI in the "Upgrades" page by using the [ New... ] button and selecting the old MSI file.

Another method is to use a custom action like explained in the Uninstall another MSI when my product is uninstalled How-To. In this case the custom action will not prompt the user (it will still be executed after "Install Execution Stage" -> "Finish Execution" -> "InstallFinalize")

The old package is created with another tool and it is not MSI-based

When you need to upgrade an installation package which is not MSI-based you can use a custom action. If the old package has an Uninstaller, the custom action can be used to launch it. For this you can use a "Launch file or open URL" custom action scheduled under the "Preparing" action group. Since the old product should be removed before the new installation, the custom action can use the condition NOT Installed.

NoteYou can see a standard action by using the "Show standard action" button on the "Custom Actions" page's toolbar.

However, if the old package doesn't have an Uninstaller, the custom action must remove all the resources (files, registry entries etc.) created by the old installation.