Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

FindRelatedProducts Standard Action


3 replies to this topic

Ajawl

Ajawl
  • Members
  • 54 posts

Posted 24 October 2001 - 15:46

I applying a minor upgrade to my product with the command line "REINSTALL=ALL REINSTALLMODE=vomus". But then, with this command line, the standard action FindRelatedProducts is not executed. Is that right?
How can I prevent a downgrade of my product in this case?

Thank you for your help,
Ajawl


Ian Blake

Ian Blake
  • Members
  • 483 posts

Posted 24 October 2001 - 17:05

FindRelatedProducts requires that the upgrade table is populated.  

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



Ajawl

Ajawl
  • Members
  • 54 posts

Posted 25 October 2001 - 08:34

Hi Ian Blake,
Thank you for your attention. But I have already done all of that.
I have populated the Upgrade Table, created a property called UPGRADEFOUND in the SecureCustomProperties and also created the Custom Action type 19 and placed it after the FindRelatedProducts action with the condition UPGRADEFOUND.

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


Ian Blake

Ian Blake
  • Members
  • 483 posts

Posted 25 October 2001 - 09:20

Sorry you are right I shoud have remebered that FindRelatedProducts is never run in maintenance mode.

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.