[wix-users] Using WixNetFxExtension

Vanniekerk, Tyrel (GE Healthcare) tyrel.vanniekerk at ge.com
Mon Feb 6 13:00:35 PST 2017


Thanks.. I will give the suggestions a go.  Useful to know to better understand the issues.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Phill Hogland
Sent: Monday, February 6, 2017 2:14 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: EXT: Re: [wix-users] Using WixNetFxExtension

1) Can you post the authoring that corresponds to that log post?


2) One way to debug this issue is in the VS IDE right-click the bundle project, select Properties, go to the Build tab and select 'Do not delete temporary files.  I would probably also change the VS-IDE/Tools/Options/Projects and Solutions/Build and Run/ and set the MSBuild project verbosity to Diagnostic if you use the IDE.   If you use MSBuild scripts rather than the IDE pass MSBuild the verbose=diagnostic flag.  That will give you a lot more information on how the bundle is being compiled.  After doing a build folder at a temp path indicated in the build log where the contents which are packed into the bundle.exe are copied too and compressed, etc.  So that should clarify if the file is missing or named differently than you expect.


3) When you run bundle on a test PC you can use ProcessEx or similar to see what the path is that the bundle is using when it is logging the error.  I know the path is in the log but seeing the activity in ProcessEx (from Microsoft SysInternals) may help.


I did not have any problems implementing this nearly a year ago, with many builds and test cycles since then, so I think you will find the issue.  Also as a test you might try to do the implementation with NetFx452, even though that is not your goal, to see if you can get that tto work, and then work from there to figure out any issues specific to NetFx462.




________________________________
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 1:00:24 PM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] Using WixNetFxExtension

I guess this is where I totally miss something.  I had my code exactly a you have it, but I simply cannot get wix to look for the files in the payload/temp folder.

This is so extremely frustrating because I must just be doing something wrong.  I am tempted to create a small sample project to replicate the issue in a controlled environment.

My log file shows WiX trying to find the .net exe in my debug folder, not in the temp folder where the payload was copied:
[2CA0:2CE4][2017-02-06T11:24:53]i370: Session begin, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{4c6529a4-772a-468c-95e3-5f714181574d}, options: 0x7, disable resume: No
[2CA0:2CE4][2017-02-06T11:24:54]i000: Caching bundle from: 'C:\Users\212401~1.LOG\AppData\Local\Temp\{06074252-8922-4EE5-8CE4-0928B7AC9E45}\.be\MyProductSetup.exe' to: 'C:\ProgramData\Package Cache\{4c6529a4-772a-468c-95e3-5f714181574d}\MyProductSetup.exe'
[2CA0:2CE4][2017-02-06T11:24:54]i320: Registering bundle dependency provider: {4c6529a4-772a-468c-95e3-5f714181574d}, version: 10.0.0.0
[2CA0:2CE4][2017-02-06T11:24:54]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{4c6529a4-772a-468c-95e3-5f714181574d}, resume: Active, restart initiated: No, disable resume: No
[2558:2FE0][2017-02-06T11:24:54]w343: Prompt for source of package: NetFx462Redist, payload: NetFx462Redist, path: D:\Dev\MyProduct\Installers\MyProduct\bin\Debug\redist\NDP462-KB3151800-x86-x64-AllOS-ENU.exe
[2558:2FE0][2017-02-06T11:24:54]e054: Failed to resolve source for file: D:\Dev\MyProduct\Installers\MyProduct\bin\Debug\redist\NDP462-KB3151800-x86-x64-AllOS-ENU.exe, error: 0x80070002.
[2558:2FE0][2017-02-06T11:24:54]e000: Error 0x80070002: Failed while prompting for source (original path 'D:\Dev\MyProduct\Installers\MyProduct\bin\Debug\redist\NDP462-KB3151800-x86-x64-AllOS-ENU.exe').
[2558:2FE0][2017-02-06T11:24:54]e313: Failed to acquire payload: NetFx462Redist to working path: C:\Users\212401~1.LOG\AppData\Local\Temp\{06074252-8922-4EE5-8CE4-0928B7AC9E45}\NetFx462Redist, error: 0x80070002.
[2558:0520][2017-02-06T11:24:54]e000: Error 0x80070002: Failed while caching, aborting execution.
[2CA0:2CE4][2017-02-06T11:24:54]i372: Session end, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{4c6529a4-772a-468c-95e3-5f714181574d}, resume: None, restart: None, disable resume: No
[2CA0:2CE4][2017-02-06T11:24:54]i330: Removed bundle dependency provider: {4c6529a4-772a-468c-95e3-5f714181574d}
[2CA0:2CE4][2017-02-06T11:24:54]i352: Removing cached bundle: {4c6529a4-772a-468c-95e3-5f714181574d}, from path: C:\ProgramData\Package Cache\{4c6529a4-772a-468c-95e3-5f714181574d}\
[2CA0:2CE4][2017-02-06T11:24:54]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{4c6529a4-772a-468c-95e3-5f714181574d}, resume: None, restart initiated: No, disable resume: No

Note the path Debug\redist instead of AppData\Local\Temp\{06074252-8922-4EE5-8CE4-0928B7AC9E45}\.be\redist.

What am I missing?  I has to be something simple.  I have a -b specified that points to where my prerequisite files are located, but I cannot imagine that being an issue.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Phill Hogland
Sent: Monday, February 6, 2017 12:31 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: EXT: Re: [wix-users] Using WixNetFxExtension

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 https://urldefense.proofpoint.com/v2/url?u=http-3A__www.firegiant.com_&d=DQICAg&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3wUrLrDQYWSI&r=oAJIeMTNC3Z6LlnozAjna4bWEZCGLInzcwB6EkZAFeU&m=POwgxvLaTgAEC1q_0q8JAi7JPK5juq03vq2LqBl6kuo&s=-24NO1zR-jr1HNAQdup-K0djPn1bidFl8juMH4lSMxA&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=POwgxvLaTgAEC1q_0q8JAi7JPK5juq03vq2LqBl6kuo&s=-24NO1zR-jr1HNAQdup-K0djPn1bidFl8juMH4lSMxA&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=BZZHDYxvs09pfuJvl5gZqn-xHdbmJbYbl894-I1O1pw&s=1jStV3vXT3xCA5h86RrmWfrvGkOCF0a47YHQwVwJgw4&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=BZZHDYxvs09pfuJvl5gZqn-xHdbmJbYbl894-I1O1pw&s=1jStV3vXT3xCA5h86RrmWfrvGkOCF0a47YHQwVwJgw4&e= 



More information about the wix-users mailing list