Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Howto use configurable Merge Modules in Wix?

AFAIK it's done like this:

Product:

<Merge Id ="HelpInstaller" SourceFile="HelpInstaller.msm" Language="1033" DiskId="1">
                <ConfigurationData Name="SurpressInstallation_Config" Value="&amp;HelpFeature"/>
 </Merge>

Merge Module:

<Property Id="SupressInstallation" Value='0'  />

<Substitution Table='CustomAction' Row='SetSupressInstallationProperty' Column='Target' Value='[=SupressInstallation_Config]'/>
<CustomAction Id='SetSupressInstallationProperty' Property='SupressInstallation'      Value='[SupressInstallation]'/>  
<InstallExecuteSequence>
  <Custom Action='SetSupressInstallationProperty' Before='RegisterHelp' />
  <Custom Action='RegisterHelp' After='CostFinalize'>(NOT Installed) AND (NOT UPGRADINGPRODUCTCODE) AND SupressInstallation = 3) </Custom>
</InstallExecuteSequence>

But when i did it like above i get an error: Encountered an unexpected merge error of type 'msmErrorDataRequestFailed' for which therer is currently no error messagte to display.

Can anyone tell me howto solve that problem? What i basically want to do is to execute a custom action in the merge module only when a certain feature is selected..Is this the right way to do it? Thanks Daniel

like image 656
DanielB Avatar asked Jan 19 '10 07:01

DanielB


People also ask

What is the purpose of a merge module?

Merge modules provide a standard method by which developers deliver shared Windows Installer components and setup logic to their applications. Merge modules are used to deliver shared code, files, resources, registry entries, and setup logic to applications as a single compound file.


1 Answers

You have to define Configuration node under module:

<Property Id="SupressInstallation" Value='0'  />
<Configuration Name="SupressInstallation_Config" Format="Text"/>
<Substitution Table='CustomAction' Row='SetSupressInstallationProperty' Column='Target' Value='[=SupressInstallation_Config]'/>
<CustomAction Id='SetSupressInstallationProperty' Property='SupressInstallation'      Value='[SupressInstallation]'/>  
<InstallExecuteSequence>
  <Custom Action='SetSupressInstallationProperty' Before='RegisterHelp' />
  <Custom Action='RegisterHelp' After='CostFinalize'>(NOT Installed) AND (NOT UPGRADINGPRODUCTCODE) AND SupressInstallation = 3) </Custom>
</InstallExecuteSequence>
like image 114
Sergey Voitsekh Avatar answered Sep 18 '22 18:09

Sergey Voitsekh