0

I have a .msi that was recently transformed into a .msm and became component of a larger .msi.

I have a Custom Action that aborts installation at downgrade.

<Custom Action="AbortDowngrade" After="InstallChecks">INSTALLED_BUILDNO &gt; INSTALLING_BUILDNO</Custom>

defined as:

<CustomAction Id="AbortDowngrade" Error="Downgrade not allowed"/>

The Custom Action is type 19 and causes entire .msi to abort.

How can I update the .msm so it fails gracefully without affecting the .msi?

Thanks!

Arnold Waldraf
  • 160
  • 3
  • 13

1 Answers1

0

After an msm is merged and built into an MSI there is only the MSI, there is no install of the merge module. A merge module is just a bunch of components that are installed with the MSI. You can't fail some of the components that are being installed.

So it's hard to give a direct answer because you can't fail part of an MSI. If the custom action isn't needed, then delete it. It seems to apply to downgrades, so it applies to an MSI, and it's slightly unusual to have MSI package restrictions in one of the merge modules that are going into it. Or if it applies only in certain conditions then apply a condition to the custom action.

The best way to disallow installing a collection of components is to put them in a feature and have a condition on that feature, like this:

How to use conditions in features in WiX?

Otherwise the reference to build numbers in that condition implies that you might be thinking that you don't install those files if some version of them is already installed. If so, this is definitely not the usual approach. File versions determine whether files are to be replaced or not, so if you install lower versioned files they will not replace the existing ones.

Community
  • 1
  • 1
PhilDW
  • 20,260
  • 1
  • 18
  • 28
  • The CustomAction is needed so I can stop the installation for that bunch of components within the MSM. I changed the current type 9 CustomAction into setting a property known as AbortDowngradeProperty. This property can be used to condition other CustomActions, but I can't condition the Fragment containing the files described within the MSM: error LGHT0184: "An unexpected row in the 'LaunchCondition' table was found in this merge module. Merge modules cannot contain the 'LaunchCondition' table." – Arnold Waldraf Oct 15 '14 at 05:59