AFAIK it's done like this:
Product:
<Merge Id ="HelpInstaller" SourceFile="HelpInstaller.msm" Language="1033" DiskId="1">
<ConfigurationData Name="SurpressInstallation_Config" Value="&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
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.
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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With