[wix-users] Using WixNetFxExtension

Phill Hogland phill.hogland at rimage.com
Mon Feb 6 10:31:27 PST 2017


I started to past my code in the earlier post, and then just gave you that link, however your question relates to using the Payload/@name attribute to define the folder when the bundle is extracted on the target system


This is what I use for NetFx452 (as a child of BootstrapperApplicationRef)

    <PayloadGroup Id="NetFx452RedistPayload">
      <Payload Name="redist\NDP452-KB2901907-x86-x64-AllOS-ENU.exe" SourceFile="<some path in your source tree>\NetFx542Ofline\NDP452-KB2901907-x86-x64-AllOS-ENU.exe"/>
    </PayloadGroup>


Note this is for NetFx452.  If you are using NetFx462 then download the package from Microsoft and put at the path defined for 'source' attribute AND change the name of the exe file in the above snippet.  The name attribute defines the folder tree in the extracted temp folder on the target system, which is true of any use of the Payload element.

________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Vanniekerk, Tyrel (GE Healthcare) <tyrel.vanniekerk at ge.com>
Sent: Monday, February 6, 2017 12:10:01 PM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] Using WixNetFxExtension

You mean adding the following:

<Bundle>
    <PayloadGroup Id="NetFx452RedistPayload">
        <Payload Name="redist\NDP452-KB2901907-x86-x64-AllOS-ENU.exe"
                 SourceFile="X:\path\to\redists\in\repo\NDP452-KB2901907-x86-x64-AllOS-ENU.exe"/>
    <PayloadGroup/>
</Bundle>

I did that, but instead of looking for redist\NDP452-KB2901907-x86-x64-AllOS-ENU.exe in the temp folder (the path with a guid and .ba), it tried to find the file in my debug folder where I build/ran my setup.  That's the piece I am missing, how to convince WiX to look in the temp folder for the file that was extracted from the payload.

The code in the wix source:
  <Fragment>
    <util:RegistrySearchRef Id="NETFRAMEWORK45"/>

    <WixVariable Id="WixMbaPrereqPackageId" Value="NetFx462Redist" />
    <WixVariable Id="WixMbaPrereqLicenseUrl" Value="$(var.NetFx462EulaLink)" Overridable="yes" />
    <WixVariable Id="NetFx462RedistDetectCondition" Value="NETFRAMEWORK45 >= $(var.NetFx462MinRelease)" Overridable="yes" />
    <WixVariable Id="NetFx462RedistInstallCondition" Value="" Overridable="yes" />
    <WixVariable Id="NetFx462RedistPackageDirectory" Value="redist\" Overridable="yes" />

    <PackageGroup Id="NetFx462Redist">
      <ExePackage
          InstallCommand="/q /norestart /ChainingPackage "[WixBundleName]" /log "[NetFx462FullLog].html""
          RepairCommand="/q /norestart /repair /ChainingPackage "[WixBundleName]" /log "[NetFx462FullLog].html""
          UninstallCommand="/uninstall /q /norestart /ChainingPackage "[WixBundleName]" /log "[NetFx462FullLog].html""
          PerMachine="yes"
          DetectCondition="!(wix.NetFx462RedistDetectCondition)"
          InstallCondition="!(wix.NetFx462RedistInstallCondition)"
          Id="NetFx462Redist"
          Vital="yes"
          Permanent="yes"
          Protocol="netfx4"
          DownloadUrl="$(var.NetFx462RedistLink)"
          LogPathVariable="NetFx462FullLog"
          Compressed="no"
          Name="!(wix.NetFx462RedistPackageDirectory)NDP462-KB3151800-x86-x64-AllOS-ENU.exe">
        <RemotePayload
          CertificatePublicKey="52868DFCA6E3AF2632389E6C1EE7D0468D3797D0"
          CertificateThumbprint="3BDA323E552DB1FDE5F4FBEE75D6D5B2B187EEDC"
          Description="Microsoft .NET Framework 4.6.2 Setup"
          Hash="A70F856BDA33D45AD0A8AD035F73092441715431"
          ProductName="Microsoft .NET Framework 4.6.2"
          Size="62008080"
          Version="4.6.1590.0" />
      </ExePackage>
    </PackageGroup>
  </Fragment>

Looks to find it in !(wix.NetFx462RedistPackageDirectory)NDP462-KB3151800-x86-x64-AllOS-ENU.exe, where NetFx462RedistPackageDirectory is set to "redist\".  Does this mean I have to set the NetFx462RedistPackageDirectory variable to point to the "<temp folder>\redist\" for this to work?

If I included that code segment above directly into my wxs file and that works, presumably because when I build it, it finds the .exe directly from my hard drive, instead of from the payload.  Then in the debug folder it contains a sub-folder with the file in it.  In other words, the file itself not included in a payload in the setup file.

I have had the same issue with other installs I wanted to run.  I created payload groups with some files in it, then tried to reference the exe from the ExePackage, but it would always just copy the exe to a sub-folder of the build directory and not look at the payload.  I ended up calling those installs manually from my bootstrapper code.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Phill Hogland
Sent: Monday, February 6, 2017 11:26 AM
To: wix-users at lists.wixtoolset.org
Subject: EXT: Re: [wix-users] Using WixNetFxExtension

I'm sorry I meant to add this link

https://urldefense.proofpoint.com/v2/url?u=http-3A__wixtoolset.org_documentation_manual_v3_howtos_redistributables-5Fand-5Finstall-5Fchecks_install-5Fdotnet.html&d=DQICAg&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3wUrLrDQYWSI&r=oAJIeMTNC3Z6LlnozAjna4bWEZCGLInzcwB6EkZAFeU&m=HyfXEbv0fHg9f4eesK1jjhN4Xvfz8ld0rTDfvpnaEvQ&s=8bXOFQNsnAZZ1Oju8C0wyn7wLXxYISVY3elIsERfJBY&e=

How To: Install the .NET Framework Using Burn<https://urldefense.proofpoint.com/v2/url?u=http-3A__wixtoolset.org_documentation_manual_v3_howtos_redistributables-5Fand-5Finstall-5Fchecks_install-5Fdotnet.html&d=DQICAg&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3wUrLrDQYWSI&r=oAJIeMTNC3Z6LlnozAjna4bWEZCGLInzcwB6EkZAFeU&m=HyfXEbv0fHg9f4eesK1jjhN4Xvfz8ld0rTDfvpnaEvQ&s=8bXOFQNsnAZZ1Oju8C0wyn7wLXxYISVY3elIsERfJBY&e= > wixtoolset.org How To: Install the .NET Framework Using Burn. Applications written using the .NET Framework often need to bundle the .NET framework and install it with their ...




________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Phill Hogland <phill.hogland at rimage.com>
Sent: Monday, February 6, 2017 11:02:30 AM
To: wix-users at lists.wixtoolset.org
Subject: Re: [wix-users] Using WixNetFxExtension

I used the information from the chm, where Bob added the 'optional' Step 3 to cover the 'off-line' scenarios, which is what you are looking for.  That detail works for me.


________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Vanniekerk, Tyrel (GE Healthcare) <tyrel.vanniekerk at ge.com>
Sent: Monday, February 6, 2017 10:33:47 AM
To: wix-users at lists.wixtoolset.org
Subject: [wix-users] Using WixNetFxExtension

Hi,

So most posts I have found about using the WixNetFxExtension to do an offline .net install simply tell you to copy the XML from the WiX source and not how to get the NetFx Extension to work.  The payload command will copy the redist for .net to some temp folder, that part works, but the package ref (in my case it is <PackageGroupRef Id="NetFx462Redist" />) still tries to find the exe in the folder relative to where you have your installer.

Is there a way to get this to work or can't you use the NetFx extension for offline installs?  I had the XML directly in my installer before, but figured I would like to try and use the extension.

Thanks,
Tyrel


____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant https://urldefense.proofpoint.com/v2/url?u=http-3A__www.firegiant.com_&d=DQICAg&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3wUrLrDQYWSI&r=oAJIeMTNC3Z6LlnozAjna4bWEZCGLInzcwB6EkZAFeU&m=HyfXEbv0fHg9f4eesK1jjhN4Xvfz8ld0rTDfvpnaEvQ&s=2-PMapR5K1dmQwsCmSSZ-mSHX0X53nq-buJnOlnuDOs&e=

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant https://urldefense.proofpoint.com/v2/url?u=http-3A__www.firegiant.com_&d=DQICAg&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3wUrLrDQYWSI&r=oAJIeMTNC3Z6LlnozAjna4bWEZCGLInzcwB6EkZAFeU&m=HyfXEbv0fHg9f4eesK1jjhN4Xvfz8ld0rTDfvpnaEvQ&s=2-PMapR5K1dmQwsCmSSZ-mSHX0X53nq-buJnOlnuDOs&e=

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant https://urldefense.proofpoint.com/v2/url?u=http-3A__www.firegiant.com_&d=DQICAg&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3wUrLrDQYWSI&r=oAJIeMTNC3Z6LlnozAjna4bWEZCGLInzcwB6EkZAFeU&m=HyfXEbv0fHg9f4eesK1jjhN4Xvfz8ld0rTDfvpnaEvQ&s=2-PMapR5K1dmQwsCmSSZ-mSHX0X53nq-buJnOlnuDOs&e=

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list