views:

27

answers:

1

Hello

I have BasicMsi project in InstallShield. I want to be able to update this application however I cannot find InstallShield variable that returns the number of already installed ProductVersion, I know that I can workout this version manually by using Upgrade node and defining set of rules however right now I'm searching for the simplest solution. I want to use this version number in code in order to feed some tool that bases on this value.

I want to be able to upgrade to the current version, not only from the previous version (for example 3.0.2) but also from earlier ones (2.1.0, 1.0.0 etc).

+1  A: 

If we are talking Major Upgrades your ActionProperty defined in the Upgrade table will have the ProductCode after FindRelatedProducts has executed. There is also UPGRADINGPRODUCTCODE that is set by RemoveExistingProducts.

I know of no other built-in mechanism to resolve the ProductVersion of the product being upgraded. You will have to write a custom action to query the MSI API based on your ProductCode / UpgradeCode to get this information.

An alternative would be to write a registry value during the first install ( or perhaps even use what's already stored in Add/Remove Programs Uninstall key ) and then use an AppSearch/Reglocator combo to fetch it into a property.

Christopher Painter
Yes I use Major Upgrade. Thank for your answer, I was afraid that I will have to do it, this way.
Darqer

related questions