﻿<?xml version="1.0" encoding="utf-8"?>
<Product xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper" ProductCode=".NETFramework,Version=v4.8.1">
  <!-- Defines list of files to be copied on build -->
  <PackageFiles CopyAllPackageFiles="false">
    <PackageFile Name="NDP481-x86-x64-AllOS-ENU.exe" HomeSite="DotNetFX481FullWebBootstrapper" PublicKey="0"/>
    <PackageFile Name="NDP481-Web.exe" HomeSite="DotNetFX481FullWebBootstrapper" CopyOnBuild="False" PublicKey="0"/>
  </PackageFiles>
  <RelatedProducts>
    <IncludesProduct Code=".NETFramework,Version=v4.8" />
  </RelatedProducts>
  <InstallChecks>
    <RegistryCheck Property="DotNetFull_Release" Key="HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Full" Value="Release" />
    <RegistryCheck Property="DotNetFull_OSIntegrated" Key="HKLM\SOFTWARE\Microsoft\NET Framework Setup\OS Integration" Value="v4" />
    <RegistryCheck Property="OSVersion_BuildNumber" Key="HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" Value="CurrentBuildNumber" />
  </InstallChecks>
  <!-- Defines how to invoke the setup for .NET Framework redist -->
  <Commands Reboot="Immediate">
    <!--Command for downlevel and future Operating Systems where netfx is not integrated within OS.-->
    <Command PackageFile="NDP481-x86-x64-AllOS-ENU.exe" Arguments=" /q /norestart /ChainingPackage FullX64Bootstrapper" EstimatedInstalledBytes="437362964" EstimatedInstallSeconds="600" EstimatedTempBytes="2095870765">
      <!-- These checks determine whether the package is to be installed -->
      <InstallConditions>
        <!-- This command is only for Samesite -->
        <BypassIf Property="InstallMode" Compare="ValueEqualTo" Value="HomeSite" />
        <!-- This indicates .NET Framework 4.8.1 is already installed -->
        <BypassIf Property="DotNetFull_Release" Compare="ValueGreaterThanOrEqualTo" Value="533320" />
        <!-- Block install if user does not have admin privileges -->
        <FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired" />
        <!-- Block install on less than Windows 10 20H2 (19042) -->
        <FailIf Property="OSVersion_BuildNumber" Compare="VersionLessThan" Value="19042" String="InvalidPlatformWinNT" />
        <!-- Block install if the platform is IA-64 -->
        <FailIf Property="ProcessorArchitecture" Compare="ValueEqualTo" Value="IA64" String="InvalidPlatformArchitecture" />
      </InstallConditions>
      <ExitCodes>
        <ExitCode Value="0" Result="Success" />
        <ExitCode Value="3010" Result="SuccessReboot" />
        <DefaultExitCode Result="Fail" FormatMessageFromSystem="false" String="GeneralFailure" />
      </ExitCodes>
    </Command>
    <!--Command for downlevel and future Operating Systems where netfx is not integrated within OS.-->
    <Command PackageFile="NDP481-Web.exe" Arguments=" /q /norestart /ChainingPackage FullX64Bootstrapper /lcid 1033" EstimatedInstalledBytes="437362964" EstimatedInstallSeconds="600" EstimatedTempBytes="468232836">
      <!-- These checks determine whether the package is to be installed -->
      <InstallConditions>
        <!-- This command is only for Samesite -->
        <BypassIf Property="InstallMode" Compare="ValueNotEqualTo" Value="HomeSite" />
        <!-- This indicates .NET Framework 4.8.1 is already installed -->
        <BypassIf Property="DotNetFull_Release" Compare="ValueGreaterThanOrEqualTo" Value="533320" />
        <!-- Block install if user does not have admin privileges -->
        <FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired" />
        <!-- Block install on less than Windows 10 20H2 (19042) -->
        <FailIf Property="OSVersion_BuildNumber" Compare="VersionLessThan" Value="19042" String="InvalidPlatformWinNT" />
        <!-- Block install if the platform is IA-64 -->
        <FailIf Property="ProcessorArchitecture" Compare="ValueEqualTo" Value="IA64" String="InvalidPlatformArchitecture" />
      </InstallConditions>
      <ExitCodes>
        <ExitCode Value="0" Result="Success" />
        <ExitCode Value="3010" Result="SuccessReboot" />
        <DefaultExitCode Result="Fail" FormatMessageFromSystem="false" String="GeneralFailure" />
      </ExitCodes>
    </Command>
  </Commands>
</Product>
