views:

779

answers:

2

Greetings Friends,

Coming straight to point; 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 and i got this info form the below link

http://helpnet.acresso.com/robo/proj...Downgrades.htm

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 tell "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.

i hope u all understood the this issue...

Please help in this context. 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..

Please help..

+1  A: 

First, the link you've supplied in your question is broken -- can you fix it?

Anyway, 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.

If you fix the link in the question, I might better understand your problem.

William Leara
opps!..sorry for the inconvinience of the borken link..plz find the linkhttp://helpnet.acresso.com/robo/projects/installshield14helplib/PreventingDowngrades.htmDo i need to change the upgrade code every time i create the new setup. i will check and update you...
Chetan
Yes, when doing a Major Upgrade, you must change: ProductCode, ProductVersion, and PackageCode. By default, IS changes the PackageCode for you. You must change the version number and the ProductCode yourself. This is why you're receiving the message about the product already being installed. (note: I misspoke earlier when I said UpgradeCode -- the UpgradeCode stays constant -- the ProductCode must be changed by you.
William Leara
+5  A: 

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.

sascha
greetings sascha actually Installshield is internally using the windows installer; Installshield is following its own set of representing the version numbers. I do consider your point and update you soon on this issue.
Chetan
Both Windows Installer and InstallShield will let you use four digit version numbers, however unless you author a major upgrade the fourth digit will be ignored at runtime by Windows Installer, no matter what you've done in InstallShield. Took me hours to figure that out when I was using it :)
sascha

related questions