Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Installation 如何在Wix中使用可配置的合并模块?_Installation_Wix_Windows Installer_Wix3 - Fatal编程技术网

Installation 如何在Wix中使用可配置的合并模块?

Installation 如何在Wix中使用可配置的合并模块?,installation,wix,windows-installer,wix3,Installation,Wix,Windows Installer,Wix3,好吧,是这样做的: 产品: <Merge Id ="HelpInstaller" SourceFile="HelpInstaller.msm" Language="1033" DiskId="1"> <ConfigurationData Name="SurpressInstallation_Config" Value="&amp;HelpFeature"/> </Merge> 合并模块: <Proper

好吧,是这样做的:

产品:

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

合并模块:

<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>


(未安装)和(未升级ProductCode)以及SupersInstallation=3)
但当我像上面那样做时,我得到了一个错误: 遇到类型为“MSErrorDataRequestFailed”的意外合并错误,当前没有要显示的错误消息


有人能告诉我如何解决那个问题吗?我基本上想做的是仅在选择某个功能时在合并模块中执行自定义操作。这是正确的方法吗?谢谢Daniel,功能依赖于合并模块,而不是相反。合并模块中的任何内容都不应引用合并模块之外的任何内容,例如ProductName、ProductCode或功能名称,因为这将使合并模块与特定产品紧密耦合,而不是通用的可重用模块。这样做基本上会产生一个循环引用,这不是一个好主意

您可能需要(在不了解更多信息的情况下很难说)根据您的情况使用合并模块中某个组件的操作状态

例如,如果component1有file1,并且您需要在安装此组件/文件时启动customaction1,那么您将使用以下表达式:

$component1=3//INSTALLSTATE\u LOCAL

这样,如果这个合并模块被合并到功能名称为A、B或C的Product1、Product2或Product3中,那么就不重要了,因为关联在组件级别

如果您试图绑定的功能是一个不同的功能,那么这一切都需要移动到一个不同的合并模块中,该模块被合并到该功能中。您可能需要创建要关联的虚拟组件

现在,如果您想忽略所有这些建议,请查看FeatureActionState操作符并紧密耦合


那听起来像是个bug。您至少应该得到一条更具描述性的错误消息来解释出错的原因。请随意在

处提交错误。您必须在模块下定义配置节点:

<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>

(未安装)和(未升级ProductCode)以及SupersInstallation=3)