Installing .NET redistributable with Wix Bootstrapper (Burn)
Asked Answered
B

1

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.

Bloomers answered 20/11, 2013 at 15:6 Comment(2)
How did you get burn to copy the redist folder to the installer's local machine?Sarcenet
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.Sarcenet
C
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>
Cystoscope answered 21/6, 2014 at 7:18 Comment(3)
How can we detect and skip installation if higher version of .Net is installed ?Knackwurst
DetectCondition="(Netfx4FullVersion=&quot;4.5.50709&quot;) AND (NOT VersionNT64 OR (Netfx4x64FullVersion=&quot;4.5.50709&quot;))"Cystoscope
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.Knackwurst

© 2022 - 2024 — McMap. All rights reserved.