开发者

How to get ProductVersion of previous installation during update in InstallShield

开发者 https://www.devze.com 2023-01-18 14:41 出处:网络
I have BasicMsi project in InstallShield. I want to be able to update this application however I cannot find InstallShield var开发者_Python百科iable that returns the number of already installed Produc

I have BasicMsi project in InstallShield. I want to be able to update this application however I cannot find InstallShield var开发者_Python百科iable 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).


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消