cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
AaronM
Level 6

Condition for custom action during minor upgrade

Conditional Statement Syntax
http://msdn.microsoft.com/en-us/library/aa368012.aspx

I have some custom actions with a condition to run when a certain feature is installed.

&FeatureName=3

That works great with first time installs and major upgrades. However, I would also like the custom action to run during minor upgrades when that feature is being updated (newer files).

My initial thought was that the feature's action would be INSTALLSTATE_LOCAL for minor upgrades also. However, looking at the log it shows as re-install.

[FONT="Courier New"]MSI (s) (B0:C4) [14:10:35:562]: Feature: FeatureName; Installed: Local; Request: Reinstall; Action: Reinstall[/FONT]

As such, the custom action does not run during minor upgrade. I then modified my condition to handle minor upgrades and maintenance repairs.

(&FeatureName=3) OR (!FeatureName=3 AND (REINSTALL="ALL" OR REINSTALL><"FeatureName"))

The above works great. I guess this forum post is less of question and more of a knowledge share in case others had similar scenario.

I was also wondering if anyone could shed some additional light on the IS_MINOR_UPGRADE property. I can't seem to find any documentation on the property in InstallShield help or in MSDN for Windows Installer.

Perhaps another option would be to use:
(&FeatureName=3) OR (!FeatureName=3 AND IS_MINOR_UPGRADE)
Labels (1)
0 Kudos
(1) Reply
AaronM
Level 6

I found an additional thread that discusses IS_MINOR_UPGRADE
http://community.flexerasoftware.com/showthread.php?t=138411
0 Kudos