| 1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> |
| 2 | |
| 3 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> |
| 4 | |
| 5 | <!-- |
| 6 | .NET Framework installation state properties |
| 7 | |
| 8 | Official documentation can be found at the following locations: |
| 9 | https://learn.microsoft.com/en-us/dotnet/framework/install/guide-for-developers |
| 10 | https://learn.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed |
| 11 | --> |
| 12 | |
| 13 | <?define NetFx481MinRelease = 533320 ?> |
| 14 | <?define NetFx481WebLink = https://go.microsoft.com/fwlink/?LinkId=2203304 ?> |
| 15 | <?define NetFx481RedistLink = https://go.microsoft.com/fwlink/?linkid=2203305 ?> |
| 16 | <?define NetFx481EulaLink = https://referencesource.microsoft.com/license.html ?> |
| 17 | <?define NetFx481WebId = NetFx481Web ?> |
| 18 | <?define NetFx481RedistId = NetFx481Redist ?> |
| 19 | |
| 20 | <Fragment> |
| 21 | <PropertyRef Id="WIXNETFX4RELEASEINSTALLED" /> |
| 22 | <Property Id="WIX_IS_NETFRAMEWORK_481_OR_LATER_INSTALLED" Secure="yes" /> |
| 23 | <SetProperty Id="WIX_IS_NETFRAMEWORK_481_OR_LATER_INSTALLED" Value="1" After="AppSearch" Condition="WIXNETFX4RELEASEINSTALLED >= "#$(var.NetFx481MinRelease)"" /> |
| 24 | </Fragment> |
| 25 | |
| 26 | <Fragment> |
| 27 | <util:RegistrySearchRef Id="NETFRAMEWORK45" /> |
| 28 | |
| 29 | <WixVariable Id="NetFx481WebDetectCondition" Value="NETFRAMEWORK45 >= $(var.NetFx481MinRelease)" Overridable="yes" /> |
| 30 | <WixVariable Id="NetFx481WebInstallCondition" Value="" Overridable="yes" /> |
| 31 | <WixVariable Id="NetFx481WebPackageDirectory" Value="redist\" Overridable="yes" /> |
| 32 | |
| 33 | <PackageGroup Id="$(var.NetFx481WebId)"> |
| 34 | <ExePackage |
| 35 | CacheId="$(var.NetFx481WebId)_AFBF0B8B6A18F7E23CCA1DDCD0AC1A55B4035173" |
| 36 | InstallArguments="/q /norestart /log "[NetFx481WebLog].html"" |
| 37 | PerMachine="yes" |
| 38 | DetectCondition="!(wix.NetFx481WebDetectCondition)" |
| 39 | InstallCondition="!(wix.NetFx481WebInstallCondition)" |
| 40 | Id="$(var.NetFx481WebId)" |
| 41 | Vital="yes" |
| 42 | Permanent="yes" |
| 43 | Protocol="netfx4" |
| 44 | LogPathVariable="NetFx481WebLog" |
| 45 | Cache="remove"> |
| 46 | |
| 47 | <ExePackagePayload |
| 48 | Name="!(wix.NetFx481WebPackageDirectory)ndp481-web.exe" |
| 49 | DownloadUrl="$(var.NetFx481WebLink)" |
| 50 | ProductName="Microsoft .NET Framework 4.8.1" |
| 51 | Description="Microsoft .NET Framework 4.8.1 Setup" |
| 52 | CertificatePublicKey="0A7D1EFF01D4EBAD21E85C51499576EBAA40E676" |
| 53 | CertificateThumbprint="72105B6D5F370B62FD5C82F1512F7AD7DEE5F2C0" |
| 54 | Size="1466664" |
| 55 | Version="4.8.09195.10" |
| 56 | /> |
| 57 | </ExePackage> |
| 58 | </PackageGroup> |
| 59 | </Fragment> |
| 60 | |
| 61 | <Fragment> |
| 62 | <PackageGroup Id="$(var.NetFx481WebId)AsPrereq"> |
| 63 | <PackageGroupRef Id="$(var.NetFx481WebId)" /> |
| 64 | </PackageGroup> |
| 65 | |
| 66 | <bal:BootstrapperApplicationPrerequisiteInformation PackageId="$(var.NetFx481WebId)" LicenseUrl="$(var.NetFx481EulaLink)" /> |
| 67 | </Fragment> |
| 68 | |
| 69 | <Fragment> |
| 70 | <util:RegistrySearchRef Id="NETFRAMEWORK45" /> |
| 71 | |
| 72 | <WixVariable Id="NetFx481RedistDetectCondition" Value="NETFRAMEWORK45 >= $(var.NetFx481MinRelease)" Overridable="yes" /> |
| 73 | <WixVariable Id="NetFx481RedistInstallCondition" Value="" Overridable="yes" /> |
| 74 | <WixVariable Id="NetFx481RedistPackageDirectory" Value="redist\" Overridable="yes" /> |
| 75 | |
| 76 | <PackageGroup Id="$(var.NetFx481RedistId)"> |
| 77 | <ExePackage |
| 78 | CacheId="$(var.NetFx481RedistId)_AFBF0B8B6A18F7E23CCA1DDCD0AC1A55B4035173" |
| 79 | InstallArguments="/q /norestart /log "[NetFx481RedistLog].html"" |
| 80 | PerMachine="yes" |
| 81 | DetectCondition="!(wix.NetFx481RedistDetectCondition)" |
| 82 | InstallCondition="!(wix.NetFx481RedistInstallCondition)" |
| 83 | Id="$(var.NetFx481RedistId)" |
| 84 | Vital="yes" |
| 85 | Permanent="yes" |
| 86 | Protocol="netfx4" |
| 87 | LogPathVariable="NetFx481RedistLog" |
| 88 | Cache="remove"> |
| 89 | |
| 90 | <ExePackagePayload |
| 91 | Name="!(wix.NetFx481RedistPackageDirectory)ndp481-x86-x64-allos-enu.exe" |
| 92 | DownloadUrl="$(var.NetFx481RedistLink)" |
| 93 | ProductName="Microsoft .NET Framework 4.8.1" |
| 94 | Description="Microsoft .NET Framework 4.8.1 Setup" |
| 95 | CertificatePublicKey="0A7D1EFF01D4EBAD21E85C51499576EBAA40E676" |
| 96 | CertificateThumbprint="72105B6D5F370B62FD5C82F1512F7AD7DEE5F2C0" |
| 97 | Size="77688504" |
| 98 | Version="4.8.09195.10" |
| 99 | /> |
| 100 | </ExePackage> |
| 101 | </PackageGroup> |
| 102 | </Fragment> |
| 103 | |
| 104 | <Fragment> |
| 105 | <PackageGroup Id="$(var.NetFx481RedistId)AsPrereq"> |
| 106 | <PackageGroupRef Id="$(var.NetFx481RedistId)" /> |
| 107 | </PackageGroup> |
| 108 | |
| 109 | <bal:BootstrapperApplicationPrerequisiteInformation PackageId="$(var.NetFx481RedistId)" LicenseUrl="$(var.NetFx481EulaLink)" /> |
| 110 | </Fragment> |
| 111 | </Wix> |