TheColonel26
TheColonel26

Reputation: 2728

Bundling 3rd party Msi in WiX bootstrapper

I am tying to include a driver MSI in my package chain, but I am not sure how to reference it.

I have the following code the MSI is in my project folder/Resources/DriverInstaller.msi

this is what I have, but I receive this error on build

Undefined preprocessor variable '$(var.InstallerBootstrapper.ProjectDir)'. InstallerBootstrapper

<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
  <Bundle Name="Installer" Version="4.0.0.0" Manufacturer="Laxus Hipot" UpgradeCode="7cbb781f-c5cc-4805-b599-713357824532">
    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
      <bal:WixStandardBootstrapperApplication LicenseFile="Resources\EULA.rtf" LogoFile="Resources\Icon.png" />
    </BootstrapperApplicationRef>
    <Chain>
      <MsiPackage Id="DriverInstaller" SourceFile="$(var.InstallerBootstrapper.ProjectDir)Resources\DriverInstaller.msi" />
      <MsiPackage Id="Installer" SourceFile="$(var.InstallerSetup.TargetPath)" />   
    </Chain>
  </Bundle>
</Wix>

Upvotes: 0

Views: 99

Answers (1)

Jonathan Monsonego
Jonathan Monsonego

Reputation: 163

Reference the relevant Project "InstallerBootstrapper" in the wixproj file. For example

<ProjectReference Include="..\InstallerBootstrapper.csproj">
      <Name>InstallerBootstrapper</Name>
      <Project>{project guid}</Project>
</ProjectReference>

Upvotes: 1

Related Questions