We currently have the "Automatically upgrade older versions of the product" option unchecked because we want to allow users to install and run different builds of our application on as long as the installations are in different directories. However, if the application is installed in the same directory as an existing installation, then we would rather have the installer uninstall and upgrade the previous installation before installing so there will only be one add/remove programs entry. Is there any way to do this?, or is this kind of setup not supported by Windows Installer in general? Any help would be appreciated.
In order to do this you must:
1. create a property that will contain the location of the old product.
2. put a condition to the "RemoveExistingProducts" standard action using ORCA.
1. You can set a registry key to have the value of your install
directory. Go to "Registry" page -> "New Value" -> "Folder" and select
the "Application Folder". Now, let's suppose that your previous program had that key set, you must set a property with the value of that key. In the
"Search" page, click on the "New Search" button. Give a name to that
property, let's say "MY". Go to "Add Location" -> "Registry" and then
select the registry key that you have created. The "MY" property will contain your install path.
2. Open your .msi with ORCA and in the "InstallExecuteSequence" table place the condition: MY=TARGETDIR for the "RemoveExistingProducts" action.
FOLLOW US
Get the latest news in Application Packaging