【问题标题】:Why does the WiX FileSearch and DetectCondition not work here?为什么 WiX FileSearch 和 DetectCondition 在这里不起作用?
【发布时间】:2013-07-23 11:47:03
【问题描述】:

我希望 WiX 首先为 .NET 3.5 安装 MSChart,即 ExePackage。目前,即使它已经存在,它也会始终安装它。我通过查看MSChartInstalled FileSearch 中的目标目录来检测它是否已经安装

<Bundle ... etc.>
    <Chain>
        <ExePackage Id="mschart" SourceFile="MSChart.exe"
                    DetectCondition="MSChartInstalled"
                    Permanent="yes"
        />

        <MsiPackage SourceFile="..\Setup\bin\Release\Setup.msi" />
    </Chain>
</Bundle>

<Fragment>
    <util:FileSearch
          Id='SearchForMSChart'
          Variable="MSChartInstalled"
          Result="exists"
          Path="[ProgramFilesFolder]Microsoft Chart Controls\Assemblies\System.Windows.Forms.DataVisualization.dll"
       />
</Fragment>

【问题讨论】:

    标签: wix burn wix3.7


    【解决方案1】:

    答案是使用引用将 Fragment 放入包中:

    <bundle ... >
    ...
    <util:FileSearchRef Id="SearchForMSChart"/>
    ...
    

    在此related question about checking the registry 中找到。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-05-16
      • 2019-02-10
      • 2017-10-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多