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

<Product
  xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"
  ProductCode="Microsoft.Visual.C++.8.0.x86"
>

  <!-- Defines list of files to be copied on build -->
  <PackageFiles>
    <PackageFile Name="vcredist_x86.exe"/>
  </PackageFiles>

  <InstallChecks>
    <MsiProductCheck Property="VCRedistInstalled" Product="{A49F249F-0C91-497F-86DF-B2585E8E76B7}"/>
  </InstallChecks>
  
  <!-- Defines how to invoke the setup for the Visual C++ 8.0 redist -->
  <!-- TODO: Needs EstrimatedTempSpace, LogFile, and an update of EstimatedDiskSpace -->
  <Commands Reboot="Defer">
    <Command PackageFile="vcredist_x86.exe" 
	     Arguments=' /q:a ' 
	     >

      <!-- These checks determine whether the package is to be installed -->
      <InstallConditions>
        <BypassIf Property="VCRedistInstalled" Compare="ValueGreaterThanOrEqualTo" Value="3"/>
        <!-- Block install if user does not have admin privileges -->
        <FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired"/>

        <!-- Block install on Win95 -->
        <FailIf Property="Version9X" Compare="VersionLessThan" Value="4.10" String="InvalidPlatformWin9x"/>

        <!-- Block install on NT 4 or less -->
        <FailIf Property="VersionNT" Compare="VersionLessThan" Value="5.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>
