How can I prevent a downgrade of my product in this case?
Thank you for your help,
Ajawl
Posted 24 October 2001 - 15:46
Thank you for your help,
Ajawl
Posted 24 October 2001 - 17:05
Upgrade Table
UpgradeCode - Your upgrade code
Version Min - Your current version number
Attribute - 2 (Detect only)
Action property - YOURACTIONPROPERTY
Define Property
SecureCustomProperties YOURACTIONPROPERTY
Create a Custom Action
Name ErrorUpgradingNewerVersion
Type 19
Target Error text or numeric index to Error table
Add the custom action to both User and Execute sequences just after FindRelatedProducts add the conditon to your CA. YOURACTIONPROPERTY
Hope this helps
Posted 25 October 2001 - 08:34
When I apply a Major Upgrade (with new product code) on my old product, the action FindRelatedProducts is executed and if there is a newer installed version, the custom action type 19 is showed. I have also seen it in the log file generated during the installation using the command line "/l*v log.txt".
When I apply a minor upgrade (with the same product code of the installed version) with the command line "REINSTALL=ALL REINSTALLMODE=vomus", the action FindRelatedProducts is not executed. I have also seen it when I read the log file. It was written:
"Action start 09:26:22: FindRelatedProducts.
MSI © (5C:4C): Skipping FindRelatedProducts action: not run in maintenance mode
Action ended 09:26:22: FindRelatedProducts. Return value 0."
I think that the Standard Action FindRelatedProducts should run during any type of installation.
Any idea?
Thank you,
Ajawl
Posted 25 October 2001 - 09:20
Since there are no version numbers changing in your upgrade it seems unfair to expect msiexec to know the order. I can only suggest you create a registry key to hold your own sub versioin value and use AppSearch to find this then act accordingly.
Another problem that is intractable is old version already out there are ignorant of any schemes you may want to try now.
I have to admit I do not use minor upgrades. I find Major Upgrades easier to use. Once you have done the work to set them up little more is needed you probably have sufficient control over the version number so that you can change it every build. Consider the version number "x.y.z", I let marketing dictate x.y but 0-65535 values for z belong to me.
As for the CA 19 Error dialog being shown on a Major Upgrade this should not happen if you have authored you upgrade table well. I will illustrate it with one of mine.
My current ProductVersion is 4.30.0004
My upgrade table contains two records
UpgradeCode {guid}
VersionMin 4.20.0000
VersionMax 4.30.0000
Attributes 773 (Versions inclusive migrate ignore remove failure)
ActionProperty UPGRADEVERSIONS
UpgradeCode {guid}
VersionMin 4.30.0004
Attributes 2 (Detect Only, version limit excluded)
ActionProperty NEWERVERSION
The property
SecureCustomProperties UPGRADEVERSIONS;NEWVERSION
In this case UPGRADEVERSIONS is defined if I am upgrading older versions and NEWERVERSION is defined when an older package is executed.
My CA 19 is displayed only when NEWERVERSION is defined.
It works.