[wix-users] Install an exe while my installer is running?

Carlos Sosa carlos.sosa.us at outlook.com
Wed Aug 16 14:28:25 PDT 2017


Well, after trying that and couldn't get it to work, here is what I ended doing, the detection is not working 100% I think it installs no matter wat, but for now I'm ging to move on to my next step:
If anyone want to pitch in on how to fix the detection it will be appreciated.
Tnx for your help!
Best.

1.Created a Net461.wxs as follows:

<?xml version="1.0" encoding="utf-8"?>

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" 
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">

  <!--https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/versions-and-dependencies-->
  <!--394254 (Windows 10 November Update)
      394271 (all other OS versions)-->
  
  <?define NetFx461MinRelease = 394254 ?>

  <Fragment>

    <PropertyRef Id="NETFX4xRELEASEINSTALLED" />
    <Property Id="IS_NETFRAMEWORK_461_OR_LATER_INSTALLED" Secure="yes" />
    <SetProperty Id="IS_NETFRAMEWORK_461_OR_LATER_INSTALLED" Value="1" After="AppSearch">

      NETFX4xRELEASEINSTALLED >= "#$(var.NetFx461MinRelease)"

    </SetProperty>

  </Fragment>

  
  <Fragment>
    
    <util:RegistrySearch
        Id="NETFRAMEWORKVERSION"
        Variable="NETFRAMEWORKVERSION"
        Root="HKLM"
        Key="SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full"
        Value="Release"
        Result="value" />
  
  </Fragment>

  
  <Fragment>

    <WixVariable Id="NetFx461RedistDetectCondition" Value="NETFRAMEWORKVERSION >= $(var.NetFx461MinRelease)" Overridable="yes" />
    <WixVariable Id="NetFx461RedistPackageDirectory" Value="redist\" Overridable="yes" />
    <PackageGroup Id="NetFx461Redist">
      <ExePackage

          Id="NetFx461Redist"
          InstallCommand="/q /norestart /ChainingPackage "[WixBundleName]" /log "[NetFx461FullLog].html""
          RepairCommand="/q /norestart /repair /ChainingPackage "[WixBundleName]" /log "[NetFx461FullLog].html""
          UninstallCommand="/uninstall /q /norestart /ChainingPackage "[WixBundleName]" /log "[NetFx461FullLog].html""
          PerMachine="yes"
          DetectCondition="!(wix.NetFx461RedistDetectCondition)"
          Vital="yes"
          Permanent="yes"
          Protocol="netfx4" 
          SourceFile="Lib\NDP461-KB3102436-x86-x64-AllOS-ENU.exe"
          LogPathVariable="NetFx461FullLog"
          Name="!(wix.NetFx461RedistPackageDirectory)NDP461-KB3102436-x86-x64-AllOS-ENU.exe" Cache="yes">
       
      </ExePackage>
    </PackageGroup>
    
  </Fragment>

</Wix>

Then in my bundle:

<Chain>
      <!--PackageGroupIDfromNet461-->
      <PackageGroupRef Id="NetFx461Redist"/>
      <!--MSI from Product.msi-->
      <MsiPackage SourceFile = '$(var.My_Installer.TargetPath)' Id='ABC' Vital='yes' ></MsiPackage>
    </Chain>




-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Nir Bar
Sent: Tuesday, August 15, 2017 10:09 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Install an exe while my installer is running?

I may have forgot to mention that the ExePackage should have Name="redist\NDP461-KB3102436-x86-x64-AllOS-ENU.exe".

The fragment I have for .NET 4.6.2 looks like that:


  <Fragment>
    <util:RegistrySearchRef Id="NETFRAMEWORK45"/>


    <WixVariable Id="WixMbaPrereqPackageId" Value="HmNetFx462Redist" />
    <WixVariable Id="WixMbaPrereqLicenseUrl" Value="$(var.NetFx462EulaLink)" Overridable="yes" />
    <WixVariable Id="NetFx462RedistDetectCondition" Value="NETFRAMEWORK45 &gt;= $(var.NetFx462MinRelease)" Overridable="yes" />


    <PackageGroup Id="MyNetFx462Redist">
      <ExePackage SourceFile="!(bindpath.REDIST)\NDP462-KB3151800-x86-x64-AllOS-ENU.exe"
                  DisplayName=".NET 4.6.2"
                  InstallCommand="/q /norestart /ChainingPackage &quot;[WixBundleName]&quot; /log &quot;[NetFx462FullLog].html&quot;"
                  DetectCondition="!(wix.NetFx462RedistDetectCondition)"
                  PerMachine="yes"
                  Id="MyNetFx462Redist"
                  Permanent="yes"
                  Protocol="netfx4"
                  LogPathVariable="NetFx462FullLog"
                  />
    </PackageGroup>
  </Fragment>




You don't need the PropertyRef fragment- this is used in MSI packages only.





--Independent WiX Expert. Creator of-
https://JetBA.net - Native and WPF WiX BootstrapperApplication Frameworks










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


More information about the wix-users mailing list