Question

I have a working Wix (BURN) bootsrapper application. Part of my prerequisites before chaining my MSI's is to install .NET 4.0 Full if it is not already installed. The first item in my chain is: <PackageGroupRef Id="NetFx40Web"/>

Like I said everything works, but because it can take several minutes for the download and install to complete, and the default progress bar is not very descriptive, I would like to launch the .Net installer with options /passive /norestart instead of /q /norestart.

Does anyone know how to overide the default InstallCommand attribute for the NetFx40Web? I don't want to do the redistributable if I can avoid it (most computers will already have .Net 4.0 that my app is installing to), but to test I did it that way and was able to make it passive.

Thanks.

Was it helpful?

Solution

Just copy the source for the NetFx40Web PackageGroup instead of referencing it. Change the Id to ensure you don't collide

<?define NetFx40EulaLink =  http://go.microsoft.com/fwlink/?LinkID=188993 ?>
<util:RegistrySearchRef Id="NETFRAMEWORK40"/>

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

<PackageGroup Id="PassiveNetFx40Web">
  <ExePackage
      InstallCommand="/passive /norestart /ChainingPackage &quot;[WixBundleName]&quot;"
      RepairCommand="/passive /norestart /repair /ChainingPackage &quot;[WixBundleName]&quot;"
      UninstallCommand="/uninstall /passive /norestart /ChainingPackage &quot;[WixBundleName]&quot;"
      PerMachine="yes"
      DetectCondition="NETFRAMEWORK40"
      Id="NetFx40Web"
      Vital="yes"
      Permanent="yes"
      Protocol="netfx4"
      DownloadUrl="$(var.NetFx40WebLink)"
      Compressed="no"
      Name="redist\dotNetFx40_Full_setup.exe">
    <RemotePayload
        Size="889416"
        Version="4.0.30319.1"
        ProductName="Microsoft .NET Framework 4"
        Description="Microsoft .NET Framework 4 Setup"
        CertificatePublicKey="672605E36DD71EC6B8325B91C5FE6971390CB6B6"
        CertificateThumbprint="9617094A1CFB59AE7C1F7DFDB6739E4E7C40508F"
        Hash="06BECADB92A5FCCA2529C0B93687C2A0C6D0D610"/>
  </ExePackage>
</PackageGroup>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top