3

We have merge modules that will install PDB files when a certain conditional variable is true however we need this condition to be set.

Can I set this condition in the WiX installer and pass it to the merge module somehow?

Keith Pinson
  • 7,835
  • 7
  • 61
  • 104
Jon
  • 31
  • 2
  • There is a lot of documentation on WiX here: http://sourceforge.net/mailarchive/forum.php?forum_name=wix-users&max_rows=25&offset=18&style=nested&viewmonth=200809&viewday=26 I've found official documentation to be somewhat lacking, good luck. – BlackICE Dec 06 '10 at 15:05

2 Answers2

4

You can set installer properties in merge modules by using this format:

<property_name>.<module_GUID>

For example:

CONDITION_PROPERTY.32D73316_E513_43C3_99F5_381A4B5F0A78

In your installer you can try using a custom action to set the property used in the merge module condition.

The custom action element can look like this:

<CustomAction Id="SetMsmProperty" Return="check" Property="CONDITION_PROPERTY.32D73316_E513_43C3_99F5_381A4B5F0A78" Value="myValue" />

You can schedule the action after InstallExecuteSequence -> AppSearch, so you can add this InstallExecuteSequence element:

<InstallExecuteSequence>
  <Custom Action="SetMsmProperty" After="AppSearch">NOT Installed</Custom>
</InstallExecuteSequence>

You can read more about wix custom actions here:

Cosmin
  • 21,216
  • 5
  • 45
  • 60
0

I just typically create a subfeature to create a variation point in the installer. You can then put a feature condition on it to control whether the components brought in by the merge modules get installed or not. This is a lot simpler then putting a condition on each component and gives you more flexibility of whether you want to show the "debug symbols" feature to the end user or not.

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100