1

I am new to Wix. I have created a Wix bootstrapper project. I was going to use variables defined from registry search to check if my .net redistributable install should run. However from this source I saw how to include links for the different .net installs bundling .net

but this will not work for an offline capable installer as stated in the article.

Is there a way to bundle my .net install into my burn package and still use something like this to run the .net install? Again I a new to wix and the way I think the PackageGroupRef is working here is to only run the install of this version of .net if needed.

Example:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
     xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension" >


<Bundle ...>
   <Chain>
      <PackageGroupRef Id="NetFx451Redist" />
      <MsiPackage ... />
  </Chain>
</Bundle>
</Wix>

Below is what I used and it installs on win 7 and installs .net 4.5.1 and after removal of my install and reinstall does not call .net 4.5.1 install.

Using Ricks Example, I did this. However I had to include the define for NetFx451MinRelease. There is something I am missing, but for now it is working. Thanks Rick.

<?define NetFx451MinRelease = 378675 ?>
<util:RegistrySearchRef Id="NETFRAMEWORK45"/>

    <Chain>

  <ExePackage Id="Netfx451Full"
                DisplayName="Microsoft .NET Framework 4.5.1"
                SourceFile="..\..\Requirements\NDP451-KB2858728-x86-x64-AllOS-ENU.exe"
                InstallCommand="/passive /norestart"
                Permanent="yes"
                Vital="yes"
                Compressed="yes"
                DetectCondition="NETFRAMEWORK45 &gt;= $(var.NetFx451MinRelease)" />


    </Chain>
dgxhubbard
  • 703
  • 2
  • 7
  • 18
  • Please post your answer as an answer separate from the question, and when you decide it's the best answer, accept it. – Tom Blodget Sep 19 '14 at 23:58

3 Answers3

1

Take a look here, What is the difference between NetFx45WebLink and NetFx45RedistLink

What we did (for .Net 4.0) is to copy and modify the source, specifically setting the SourceFile attribute to a path containing the downloaded redistributable .Net installer.

.Net 4.0 example

<Fragment>
  <util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Version" Variable="Netfx4FullVersion" />
  <util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Version" Variable="Netfx4x64FullVersion" Win64="yes" />

<PackageGroup Id="Netfx4Full">
  <ExePackage Id="Netfx4Full"
              DisplayName="Microsoft .NET Framework 4.0"
              SourceFile="..\redist\dotNetFx40_Full_x86_x64.exe"
              InstallCommand="/passive /norestart"
              Permanent="yes"
              Vital="yes"
              Compressed="yes"
              DetectCondition="Netfx4FullVersion AND (NOT VersionNT64 OR Netfx4x64FullVersion)" />
</PackageGroup>
</Fragment>
Community
  • 1
  • 1
Rick Bowerman
  • 1,866
  • 12
  • 12
0

Add the .NET offline/standalone installer to the setup and install it using the silent install switch.

Check http://unattended.sourceforge.net/installers.php for more info. Might information specific to wix, but it should help.

This answer - https://stackoverflow.com/a/2899673/1678053 - is another way of doing it.

UPDATE:
I think this is what you're looking for: https://stackoverflow.com/a/14341308/1678053

Community
  • 1
  • 1
galdin
  • 12,411
  • 7
  • 56
  • 71
  • If I understand your answer I am not looking to build a dvd that contains the .net installer on the side. I am trying to embed the installer into the burn package. I know I can do that by using an ExePackage and SourceFile and a variable to show the .net version installed. I am trying to see if the built in wix .net ext handles both together and can package a previously downloaded version of the stand alone .net installer – dgxhubbard Sep 19 '14 at 21:20
  • @dgxhubbard I've only used Inno, never used Wix before. What I do is include the setup of .NET in my setup. So the setup is decompressed to the output directory while installing. Then I use the above method to install .NET as a post install job, and then delete the setup file. Again, I don't know whether Wix has a better way to do it. – galdin Sep 19 '14 at 21:37
0

Use the /passive switch carefully.

<Fragment>
<WixVariable Id="WixMbaPrereqPackageId" Value="Netfx451Full" />
<WixVariable Id="WixMbaPrereqLicenseUrl" Value="$(var.NetFx40EulaLink)" />

<util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Version"
                     Variable="Net4FullVersion" />
<util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Version"
                     Variable="Net4x64FullVersion" Win64="yes" />

<PackageGroup Id="Netfx451Full">
  <ExePackage Id="Net45" Name="Microsoft .NET Framework 4.5.1.exe"
              Description="Microsoft .NET Framework 4.5.1 AllOS (x86 and x64) Setup"
              Cache="no" Compressed="no" PerMachine="yes" Permanent="yes" Vital="yes"
              InstallCommand="/norestart"
              SourceFile="$(var.PreRequisites_x86)DotNetFramework\NDP451-KB2858728-x86-x64-AllOS-ENU.exe"
              DetectCondition="(Net4FullVersion = &quot;4.5.50938&quot;) AND (NOT VersionNT64 OR (Net4x64FullVersion = &quot;4.5.50938&quot;))"
              InstallCondition="(VersionNT >= v6.1 OR VersionNT64 >= v6.1) AND (NOT (Net4FullVersion = &quot;4.5.50938&quot; OR Net4x64FullVersion = &quot;4.5.50938&quot;))" />
</PackageGroup>

jero2rome
  • 1,548
  • 1
  • 21
  • 39