Search code examples
wixwindows-installerinstallationwix3.6wix-extension

how to use bundle in inside wix tag?


I am trying to use bundle to install .netframework in my wix installer,

steps I followed is I have added reference for WixNetFxExtension .

and below is my code for wix in which I couldnot add tag

as far as I know, bundle should be the direct child of tag, but I m not able to use bundle in my below code.

here is the code what I have.

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
   <?define engage.client.app_TargetDir=$(var.engage.client.app.TargetDir)?>
   <Product Id="67b9d26d-ae22-451b-adba-3e62ffda836e" Name="EngageSetupCreator" Language="1033" Version="1.0.0.0" Manufacturer="hbj" UpgradeCode="965f64e1-f1a1-4755-8358-ae3ac36d3e98">
      <Package InstallerVersion="200" Platform="x64" Compressed="yes" InstallScope="perMachine" InstallPrivileges="elevated" AdminImage="yes" />
      <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
      <MediaTemplate />
      <Feature Id="ProductFeature" Title="EngageSetupCreator" Level="1">
         <ComponentGroupRef Id="ProductComponents" />
      </Feature>
   </Product>
   <Fragment>
      <SetDirectory Id="INSTALLFOLDER" Value="[WindowsVolume]Engage" />
      <Directory Id="TARGETDIR" Name="SourceDir">
         <Directory Id="WINDOWSVOLUME">
            <Directory Id="SUB_FOLDER" Name="Engage">
               <Directory Id="INSTALLFOLDER" Name="EngageSetupCreator" />
            </Directory>
         </Directory>
      </Directory>
   </Fragment>
   <Fragment>
      <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
         <Component Id="engage.client.app.exe" Guid="80597c63-7062-41c9-ac15-d51fef42f0fd">
            <File Id="engage.client.app.exe" Name="engage.client.app.exe" Source="$(var.engage.client.app_TargetDir)engage.client.app.exe" />
         </Component>
      </ComponentGroup>
      <UI>
         <UIRef Id="WixUI_Minimal" />
         <Publish Dialog="ExitDialog" Control="Finish" Event="DoAction" Value="LaunchApplication">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish>
      </UI>
      <CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" />
   </Fragment>
</Wix>

and I want to use this particular section of bundle in my above code.

<Bundle Name="Prog" Version="1.0.0.0" Manufacturer="my Corporation" UpgradeCode="*">
   <Chain>
      <PackageGroupRef Id="Netfx45FullPackage" />
   </Chain>
</Bundle>
<Fragment>
   <PackageGroup Id="Netfx45FullPackage">
      <ExePackage Id="Netfx45Xxx" Cache="no" Compressed="no" PerMachine="yes" Permanent="yes" Vital="no" InstallCommand="/q" SourceFile="..\SetupProject\dotnetfx45_full_x86_x64.exe" />
      <MsiPackage Id="MyProg" Cache="no" Compressed="no" DisplayInternalUI="yes" Vital="yes" SourceFile="$(var.installerPath)\MyProgCore.msi" />
   </PackageGroup>
</Fragment>

where I should exactly use this piece of code to get worked?


Solution

  • You will have to add another project, Bootstrapper project.

    For some basic tutorial use this example.