0

I want WiX to install MSChart for .NET 3.5 first, which is the ExePackage. At the moment, it always installs it even if it's already there. I detect if it's already installed by looking in the destination directory in the 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>
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
noelicus
  • 14,468
  • 3
  • 92
  • 111

1 Answers1

2

The answer is to bring the Fragment into the bundle using a reference:

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

As found in this related question about checking the registry.

Community
  • 1
  • 1
noelicus
  • 14,468
  • 3
  • 92
  • 111