We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

vance

how to upgrade only if previous installation directory used

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.
UdreaMihai
Posts: 90
Joined: Wed Mar 23, 2005 8:13 am

Hello Vance,

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.

Best,
Udrea Mihai
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”