Question

We have developed the project using InstallScript MSI Project in Installshield 2008 Premier Edition. In the project we have added a condition so that the older version should not be installed on Higher version.

The problem we are facing is consider the fresh project in which the Product version will be 1.0.0925.1 and condition is added to avoid higher version over lower. To add that condition I got it from the above link; along with this in the Common Tab of Major Upgrade I have ENABLED the upgrade prompt; because in future new setup comes with 1.0.0925.2 it should ask for upgrade.

Now I will create new setup with product version 1.0.0925.2 and Under the Major Upgrade's Common tab i will disable the prompt because; if user tries to install 1.0.0925.1 over 1.0.0925.2 it should not allow; in that case it is working fine; a pop is saying "Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, Use Add/Remove Programs on the control Panel. {2D0E6C46-1CC2-4174-8AAC-0B39312D8ECE}"

Now after some days there will be change and again another setup will be created with the version 1.0.0925.3 in that the prompt for the upgrade will be disabled. Now I try to install 1.0.0925.3 over 1.0.0925.2 obviously it should get Upgrade; but here the problem arises instead of asking "The setup will perform Upgrade" it will say "Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, Use Add/Remove Programs on the control Panel. {2D0E6C46-1CC2-4174-8AAC-0B39312D8ECE}" That is it is not allowing to get Upgraded since I have disabled the prompt of 1.0.0925.2. If I enable this then any setup is ran every time it will be asking for Upgrade either it is on Lower Version over Higher Version or Higher Version over Lower Version.

Even I thought of checking the product version in Installscript but I don't know how to approach even some how if I managed to get product version of already installed setup as well current running setup. but how do I change the prompt of the Upgrade at runtime since it is set at design time.

Was it helpful?

Solution

Okay, if you're using Windows Installer then you need to rethink your version numbers. Windows Installer only recognizes major.minor.build for installation packages (files however can use major.minor.build.revision, just not the installer itself)

So from the point of view of Windows Installer, 1.0.0925.1 and 1.0.0925.2 are both actually 1.0.0925, if they've got the same product code then you'll get the standard "Another version of this product is already installed" dialog.

Basically if you want to support upgrades, change the major.minor.build version number. We use the fourth "revision" field for internal use to identify beta installers, but installing a new version requires uninstalling the previous one. Upgrades are only supported for public releases where we change one of the first three fields and configure an upgrade appropriately.

OTHER TIPS

I think the problem you are having is that you're not changing the ProductCode. You first must decide whether you want to do a Major or Minor upgrade. It sounds like you've settled on a Major upgrade. Therefore, you need to generate a new ProductCode, either by using the Direct Editor and changing the Upgrade table, or by creating a new "Major Upgrade Item" in the "Upgrades" section of the InstallShield IDE.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top