Question

I have a Burn bundle (WIX 3.7) that should install the .NET 4.5 framework if it is not present on the system where the bundle is run.

Here is my fragment containing the prerequisite:

<Fragment>
<WixVariable Id="WixMbaPrereqPackageId" Value="Netfx45FullPrereq" />
<WixVariable Id="WixMbaPrereqLicenseUrl" Value="NetFx45Eula.rtf" />

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

<PackageGroup
    Id="Netfx45FullPrereq">
  <ExePackage
      Id="Netfx45FullPrereq"
      Cache="no"
      Compressed="no"
      PerMachine="yes"
      Permanent="yes"
      Vital="yes"
      SourceFile="..\..\ThirdParty\Windows Installer\dotnetfx45_full_x86_x64.exe"
      Name="dotnetfx45_full_x86_x64.exe"
      InstallCommand="/passive /norestart"
      InstallCondition="NOT Netfx45Version OR (Netfx45Version &lt; v4.5.50709)"
      DetectCondition="Netfx45Version AND (Netfx45Version &gt;= v4.5.50709)" />
</PackageGroup>
</Fragment>

I have it working on one machine, however, on another machine it does not work.

Here is the log from the machine (Window Server 2008 R2) where the .NET installer works:

[0B68:0D24][2014-01-17T16:27:24]i001: Burn v3.7.1224.0, Windows v6.1 (Build 7601: Service Pack 1), path: C:\Users\Administrator\Desktop\ProductName Installer\ProductName Setup.exe, cmdline: '-burn.unelevated BurnPipe.{27DB9848-09B3-4E3A-8CF3-D27BE5508398} {57F2A2B4-8B66-41E6-9488-A18E40965A62} 3848'
[0B68:0D24][2014-01-17T16:27:24]i000: Setting string variable 'WixBundleLog' to value 'C:\Users\ADMINI~1\AppData\Local\Temp\ProductName_20140117162724.log'
[0B68:0D24][2014-01-17T16:27:24]i000: Setting string variable 'WixBundleOriginalSource' to value 'C:\Users\Administrator\Desktop\ProductName Installer\ProductName Setup.exe'
[0B68:0D24][2014-01-17T16:27:24]i000: Loading prerequisite bootstrapper application because managed host could not be loaded, error: 0x80070490.
[0B68:0D24][2014-01-17T16:27:24]i100: Detect begin, 3 packages
[0B68:0D24][2014-01-17T16:27:24]i000: Registry key not found. Key = 'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full'
[0B68:0D24][2014-01-17T16:27:24]i102: Detected related bundle: {014bc187-ac3e-49eb-a86b-bc1aff00df4e}, type: Upgrade, scope: PerMachine, version: 0.6.0.0, operation: None
[0B68:0D24][2014-01-17T16:27:24]i102: Detected related bundle: {2171cc02-2faf-4e06-bd43-fa473ed5fa20}, type: Upgrade, scope: PerMachine, version: 0.6.0.0, operation: None
[0B68:0D24][2014-01-17T16:27:24]i102: Detected related bundle: {4240a35a-bf8b-4465-97c1-3e2653e34c25}, type: Upgrade, scope: PerMachine, version: 0.6.0.0, operation: None
[0B68:0D24][2014-01-17T16:27:24]i102: Detected related bundle: {5e33e695-3dc7-4871-a059-9965bc8c76d6}, type: Upgrade, scope: PerMachine, version: 0.6.0.0, operation: None
[0B68:0D24][2014-01-17T16:27:24]i102: Detected related bundle: {6f2e85ba-1010-4870-94a7-9e220b8d80cc}, type: Upgrade, scope: PerMachine, version: 0.6.0.0, operation: None
[0B68:0D24][2014-01-17T16:27:24]i102: Detected related bundle: {aa47b386-8505-4de6-90e5-78a7d0ce37e0}, type: Upgrade, scope: PerMachine, version: 0.6.0.0, operation: None
[0B68:0D24][2014-01-17T16:27:24]i102: Detected related bundle: {c6564625-564f-4b3c-b91f-7bcde363a62f}, type: Upgrade, scope: PerMachine, version: 0.6.0.0, operation: None
[0B68:0D24][2014-01-17T16:27:24]i102: Detected related bundle: {cd20283a-14f4-4b5d-bca9-f16d992948c4}, type: Upgrade, scope: PerMachine, version: 0.6.0.0, operation: None
[0B68:0D24][2014-01-17T16:27:24]i102: Detected related bundle: {f0c01f09-d2bb-4a26-9aac-c2be4d9b02da}, type: Upgrade, scope: PerMachine, version: 0.6.0.0, operation: None
[0B68:0D24][2014-01-17T16:27:24]i102: Detected related bundle: {f642578c-7e94-4a7e-b884-870a844c9177}, type: Upgrade, scope: PerMachine, version: 0.6.0.0, operation: None
[0B68:0D24][2014-01-17T16:27:24]i052: Condition 'NETFRAMEWORK45' evaluates to false.
[0B68:0D24][2014-01-17T16:27:24]i101: Detected package: Netfx45FullPrereq, state: Absent, cached: None
[0B68:0D24][2014-01-17T16:27:24]i101: Detected package: ProductNameSetup, state: Absent, cached: None
[0B68:0D24][2014-01-17T16:27:24]i104: Detected package: ProductNameSetup, feature: DatabaseFeature, state: Absent
[0B68:0D24][2014-01-17T16:27:24]i104: Detected package: ProductNameSetup, feature: InfrastructureFeature, state: Absent
[0B68:0D24][2014-01-17T16:27:24]i199: Detect complete, result: 0x0

Here is the log from the machine (Windows 7) where the .NET installer does not show up:

[0B78:0B00][2014-01-17T20:02:44]i001: Burn v3.7.1224.0, Windows v6.1 (Build 7601: Service Pack 1), path: C:\Users\Master of Puppets\Desktop\Release\ProductName Setup.exe, cmdline: '-burn.unelevated BurnPipe.{923B76FF-EE93-4FF9-9115-31A62D349563} {7BA5CB98-B614-4EF6-B014-7EEA687287A9} 2124'
[0B78:0B00][2014-01-17T20:02:44]i000: Setting string variable 'WixBundleLog' to value 'C:\Users\MASTER~1\AppData\Local\Temp\ProductName_20140117200244.log'
[0B78:0B00][2014-01-17T20:02:44]i000: Setting string variable 'WixBundleOriginalSource' to value 'C:\Users\Master of Puppets\Desktop\Release\ProductName Setup.exe'
[0B78:0B00][2014-01-17T20:02:44]i000: Setting string variable 'WixBundleName' to value 'ProductName'
[0B78:0B00][2014-01-17T20:02:44]i000: Loading managed bootstrapper application.
[0B78:0B00][2014-01-17T20:02:44]i000: Creating BA thread to run asynchronously.
[0B78:0B00][2014-01-17T20:02:45]i100: Detect begin, 3 packages
[0B78:0B00][2014-01-17T20:02:45]i000: Registry value not found. Key = 'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full', Value = 'Release'
[0B78:0B00][2014-01-17T20:02:45]i052: Condition 'NETFRAMEWORK45' evaluates to false.
[0B78:0B00][2014-01-17T20:02:45]i101: Detected package: Netfx45FullPrereq, state: Absent, cached: None
[0B78:0B00][2014-01-17T20:02:45]i101: Detected package: ProductNameSetup, state: Absent, cached: None
[0B78:0B00][2014-01-17T20:02:45]i104: Detected package: ProductNameSetup, feature: DatabaseFeature, state: Absent
[0B78:0B00][2014-01-17T20:02:45]i104: Detected package: ProductNameSetup, feature: InfrastructureFeature, state: Absent
[0B78:0B00][2014-01-17T20:02:45]i199: Detect complete, result: 0x0
[0B78:0B00][2014-01-17T20:02:49]i500: Shutting down, exit code: 0x0
[0B78:0B00][2014-01-17T20:02:49]i410: Variable: WixBundleAction = 4
[0B78:0B00][2014-01-17T20:02:49]i410: Variable: WixBundleElevated = 1
[0B78:0B00][2014-01-17T20:02:49]i410: Variable: WixBundleLog = C:\Users\MASTER~1\AppData\Local\Temp\ProductName_20140117200244.log
[0B78:0B00][2014-01-17T20:02:49]i410: Variable: WixBundleManufacturer = CompanyName
[0B78:0B00][2014-01-17T20:02:49]i410: Variable: WixBundleName = ProductName
[0B78:0B00][2014-01-17T20:02:49]i410: Variable: WixBundleOriginalSource = C:\Users\Master of Puppets\Desktop\Release\ProductName Setup.exe
[0B78:0B00][2014-01-17T20:02:49]i410: Variable: WixBundleProviderKey = {d62f0df8-e5e6-4fc6-9924-202de1286a25}
[0B78:0B00][2014-01-17T20:02:49]i410: Variable: WixBundleTag = 
[0B78:0B00][2014-01-17T20:02:49]i410: Variable: WixBundleVersion = 0.6.0.0
[0B78:0B00][2014-01-17T20:02:49]i007: Exit code: 0x0, restarting: No

In both cases the detect condition returns false, which I thought would trigger the .NET installer to run. Apparently that is not the case and I am not sure why I am getting two different behaviors. Does anyone have any thoughts why it would be working on one machine and not the other?

Was it helpful?

Solution

The reason it was not working was because I did not set the sku attribute in the supported runtime element of my BootstrapperCore.config file. Here is what my startup element looks like now:

<startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>

OTHER TIPS

You haven't specified an InstallCondition for the package. You have to have something like this: InstallCondition = (NOT NETFRAMEWORK45 ="4.5.50709")

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top