8

I'm new to Wix/Burn and am trying to understand some of the fundamentals. I have a simple bootstrapper that installs the required .net 4.0 framework using the following chain:

<Chain>
    <PackageGroupRef Id="NetFx40ClientRedist"/>
    <MsiPackage Id="MyApp" SourceFile="$(var.WixInstaller.TargetPath)" DisplayInternalUI="yes" />
</Chain>

as recommended by How To: Install the .NET Framework Using Burn. The application may be used on servers with no web access so it's important that .net be installed from a local redistributable. The bootstrapper seems to work very well and installs the framework as intended. The setup.exe file, though, is roughly the same size as the application (< 5 MB) so I have to assume that the framework is still being downloaded during installation.

Questions

  1. What, then, is the difference between "NetFx40ClientWeb" and "NetFx40ClientRedist" in the WixNetfxExtension package?

  2. How do I included a local redistributable in the boostrapper so that no download is needed?

EDIT:

I believe I found the answer here:

WiXNetFxExtension will check a sub-directory called "redist" where your bundle is for the package then download it if it doesn't exist at that path e.g. "redist\dotNetFx40_Client_setup.exe". This is standard Burn behaviour.

2
  • 1
    How did you get burn to copy the redist folder to the installer's local machine? Commented Mar 10, 2014 at 15:03
  • I got it to work by adding a "SourceFile" attribute to the "ExePackage" definition in the source code for NetFx40Redist, but I would still like to know how to do this without hacking the source. Commented Mar 10, 2014 at 15:27

1 Answer 1

2

the difference between the two are:
1. clientWeb - means you have to have a connection to the web and the .net 4.0 will be downloaded and after that installed on the machine.

2.clientRedist - means redistributable - meaning a full package which doesn't need any connection to the internet, you can install it on any computer.


if you use the redistributable package you should be fine - here is the example for .Net 4.5 , it is the same for .Net 4.0 only diff is the redistributable package.

<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">
  <Bundle Name="Prog" Version="1.0.0.0" Manufacturer="my Corporation" UpgradeCode="*">
    <Chain>
      <!-- TODO: Define the list of chained packages. -->
      <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" DetectCondition="(Netfx4FullVersion=&quot;4.5.50709&quot;) AND (NOT VersionNT64 OR (Netfx4x64FullVersion=&quot;4.5.50709&quot;))" InstallCondition="(VersionNT &gt;= v6.0 OR VersionNT64 &gt;= v6.0) AND (NOT (Netfx4FullVersion=&quot;4.5.50709&quot; OR Netfx4x64FullVersion=&quot;4.5.50709&quot;))" />

      <MsiPackage Id="MyProg" Cache="no" Compressed="no" DisplayInternalUI="yes" Vital="yes" SourceFile="$(var.installerPath)\MyProgCore.msi" />
    </PackageGroup>
  </Fragment>
</Wix>
Sign up to request clarification or add additional context in comments.

3 Comments

How can we detect and skip installation if higher version of .Net is installed ?
DetectCondition="(Netfx4FullVersion=&quot;4.5.50709&quot;) AND (NOT VersionNT64 OR (Netfx4x64FullVersion=&quot;4.5.50709&quot;))"
Yeah I'm using this condition. But, in systems where 4.6 is installed, burn tries to start the installer. Then I have to exit the .Net installer manually from the .Net installer UI.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.