Page 1 of 1

Allowing multiple Installations of same Application

Posted: Wed Jan 05, 2005 3:27 am
by cmiag
Some of our customers need to install our application more than once on the same computer. For example, they have a test application which is in beta, and they also have the application which is currently in production.

When the user starts the installation, it would be very nice if the installer would show a list of all currently installed versions of the product. The user should then be able to

- create a completely new installation, or

- select an existing installation (which may be of an older version or of the same version as the installed version), and select Upgrade, or

- select an existing installation (which may be of an older version or of the same version as the installed version), and select Remove

My current Installer always wants to remove any existing Version of the Product. I also cannot figure out how to display a list of all installed versions of the product.

Kind Regards
Matthias Hess

Posted: Wed Jan 05, 2005 6:52 am
by sinan
Windows Installer allows only one version of an application to be installed at a time. There are two ways Windows Installer determines version information for applications.

The Product Code should be unique for each different product, and also different versions of different products.
When the Product Code is the same for two products, then Windows Installer checks the Revision Code. If the Revision Codes are different, the install is considered to be for the same product, but an upgrade.

Therefore, I think your solution is to change Product Codes for different versions (even if the changes are only between beta and release) of your products. You can then check for the Product Codes in the script, and display the ones you recognize to be older versions, and allow the user to uninstall them before installing the current version.

As you have noticed, the default behavior is to uninstall the product when a different revision code is detected. InstallAWARE projects typically change their revision codes each time you build them, but you can customize this option in the Project Options dialog.

Unfortunately, if both the product code and revision codes are the same, Windows Installer will not allow a reinstall of your product. This is built in to the system and cannot be changed.

Posted: Wed Nov 15, 2006 3:33 am
by jweksej
How to change (generate new) product code from the script?

Posted: Wed Nov 15, 2006 8:21 am
by MichaelNesmith
You can't do that - that would break everything in Windows Installer.

However, if you want to install multiple instances of the same product, you now may do so. Just use the Transform Instance command (and read its help for more details).

Posted: Wed Nov 15, 2006 4:06 pm
by jweksej
in fact, what I want to do is kind of array where GUID for each version will be stored and according to version number, proper GUID will be used in automated way.
I've done it. Version and GUID are passed as compiler variables and build process is started via batch file with version number as parameter. GUIDs assigned to subsequent versions are stored in separate file.

Posted: Wed Nov 15, 2006 4:27 pm
by MichaelNesmith
You do realize this is not runtime generation of new GUIDs or multiple installs of the same version, which you were asking about earlier? I'm glad you have it working the way you want it.