﻿<?xml version="1.0" encoding="utf-8" ?>
<Product
  xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"
  ProductCode="Microsoft.ReportViewer.8.0"
>
    <RelatedProducts>
        <DependsOnProduct Code="Microsoft.Net.Framework.2.0" />
    </RelatedProducts>

    <PackageFiles CopyAllPackageFiles="false">
        <PackageFile Name="ReportViewer.exe" HomeSite="ReportViewerExe" PublicKey="3082010A0282010100A2DB0A8DCFC2C1499BCDAA3A34AD23596BDB6CBE2122B794C8EAAEBFC6D526C232118BBCDA5D2CFB36561E152BAE8F0DDD14A36E284C7F163F41AC8D40B146880DD98194AD9706D05744765CEAF1FC0EE27F74A333CB74E5EFE361A17E03B745FFD53E12D5B0CA5E0DD07BF2B7130DFC606A2885758CB7ADBC85E817B490BEF516B6625DED11DF3AEE215B8BAF8073C345E3958977609BE7AD77C1378D33142F13DB62C9AE1AA94F9867ADD420393071E08D6746E2C61CF40D5074412FE805246A216B49B092C4B239C742A56D5C184AAB8FD78E833E780A47D8A4B28423C3E2F27B66B14A74BD26414B9C6114604E30C882F3D00B707CEE554D77D2085576810203010001"/>
    </PackageFiles>

    <InstallChecks>
        <!-- ExternalCheck Property="ReportViewerInstalled" PackageFile="ReportViewerChk.exe"/ -->
        <RegistryCheck Property="IsViewerInstalled" Key="HKLM\Software\Microsoft\ReportViewer\v9.0" Value="Install" />
    </InstallChecks>

    <Commands Reboot="Defer">
        <Command PackageFile="ReportViewer.exe" 
             Arguments=' /q:a /c:"install /q /l"' 
             EstimatedInstalledBytes="5000000" 
             EstimatedInstallSeconds="300">

            <!-- These checks determine whether the package is to be installed -->
            <InstallConditions>
              <!--BypassIf Property="ReportViewerInstalled" Compare="ValueNotEqualTo" Value="0"/-->
              <BypassIf Property="IsViewerInstalled" Compare="ValueExists" Value="1"/>

                <!-- Block install if user does not have admin privileges -->
                <FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired"/>
            </InstallConditions>

            <ExitCodes>
                <ExitCode Value="0" Result="Success"/>
                <ExitCode Value="3010" Result="SuccessReboot"/>
                <ExitCode Value="4097" Result="Fail" String="AdminRequired"/>
                <ExitCode Value="4099" Result="Fail" String="WindowsInstallerImproperInstall"/>
                <ExitCode Value="4101" Result="Fail" String="AnotherInstanceRunning"/>
                <ExitCode Value="4113" Result="Fail" String="BetaProductFailure"/>
                <DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" />
            </ExitCodes>

        </Command>
    </Commands>
</Product>
