<?xml version="1.0" encoding="utf-8" ?> 

<Product xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper" ProductCode="Microsoft.Visual.C++.14.0.arm64">

  <!-- Defines list of files to be copied on build -->
  <PackageFiles CopyAllPackageFiles="false">
    <PackageFile Name="vc_redist.arm64.exe" HomeSite="VCRedistExe" PublicKey="3082010a0282010100c04a4875729bee52a7dbab17a57bb2c248711a9953417c5138b98d45906b0075417fbe78e9135767003f6f30eab2e593b8f482e13f88e23ff3f63e7f5aa3ee530ed2a6710fa965dcdb1bbb78df2457242de75ef4c642ba2874f8bd512422f6b23ed20c2e5d1281208ecbfa4de432428b985aec5948f38175422d86ba647ec10802c07095994f058fa224f81e9a908497182c1ee97deb40542781115643f22b4a43a400e7f2d047ef57e9d9528f8571b5ae099e9c6f812ae48d70b3fad949ebb001679e75970db7456535bb27e009f1058417e2c8f4765928ec90f97d6a9eaaadff1f350d6c198ba7da9e09757c5e50029fd6155aff74d05e3bcf4e24570a724f0203010001" />
  </PackageFiles>

  <InstallChecks>
    <RegistryCheck Property="VersionFullCheck" Key="HKLM\SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\arm64" Value="Version" />
  </InstallChecks>

  <!-- Defines how to invoke the setup for the Visual C++ 14.0 redist -->
  <Commands Reboot="Defer">
    <Command PackageFile="vc_redist.arm64.exe" Arguments=' /q '>

      <!-- These checks determine whether the package is to be installed -->
      <InstallConditions>
        <BypassIf Property="VersionFullCheck" Compare="ValueGreaterThanOrEqualTo" Value="v14.50.35719"/>

        <!-- Block install if user does not have admin privileges -->
        <FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired"/>
        <!-- Block install on any platform other than arm64 -->
        <FailIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="ARM64" String="InvalidOS"/>
        <!-- Block install on Vista or below -->
        <FailIf Property="VersionNT" Compare="VersionLessThan" Value="6.00" String="InvalidPlatformWinNT"/>
      </InstallConditions>

      <ExitCodes>
        <ExitCode Value="0" Result="Success"/>
        <ExitCode Value="3010" Result="SuccessReboot"/>
        <DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" />
      </ExitCodes>

    </Command>
  </Commands>
</Product>
