﻿<?xml version="1.0" encoding="utf-8" ?> 

<Product
  xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"
  ProductCode="BusinessObjects.CrystalReports.NET.2.0"
>
  <!-- Defines list of files to be copied on build -->
  <PackageFiles>
    <PackageFile Name="CRRedist2005_x86.msi"/>
  </PackageFiles>

  <RelatedProducts>
    <DependsOnProduct Code="Microsoft.Net.Framework.2.0" />
    <DependsOnProduct Code="Microsoft.Data.Access.Components.2.8" />
  </RelatedProducts>

  <InstallChecks>
    <RegistryCheck Property="CRBuildNum" Key="HKLM\SOFTWARE\Crystal Decisions\10.2\Crystal Reports" Value="BuildNum" /> 
  </InstallChecks>

  <Commands Reboot="Defer">
    <Command PackageFile="CRRedist2005_x86.msi"
	     Arguments='' 
	     EstimatedInstalledBytes="21000000" 
	     EstimatedInstallSeconds="300">

      <!-- These checks determine whether the package is to be installed -->

      <InstallConditions>

        <!-- ByPass if the BuildNum is the same --> 
        <BypassIf Property="CRBuildNum" Compare="ValueEqualTo" Value="570"/>
        
        <!-- 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"/>

        <!-- Block install if there is no .NET Framework -->
        <FailIf Property="DotNetInstalled" Compare="ValueEqualTo" Value="0" String="DotNetFxRequired"/>

      </InstallConditions>

      <ExitCodes>
        <ExitCode Value="0" Result="Success"/>
        <ExitCode Value="1641" Result="SuccessReboot"/>
        <ExitCode Value="3010" Result="SuccessReboot"/>
        <DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" />
      </ExitCodes>

    </Command>
  </Commands>
</Product>
