Skip to Content
0
Former Member
Jul 22, 2008 at 07:06 AM

ClickOnce, Crystal Reports XI R 2 on redistributed right

52 Views

I am running into two different problems that I believe are unrelated so I will place them in different posts.

Bottomline: my ClickOnce deployment does not correctly check to see if it needs to install the Crystal Reports redistributable.

I have a .Net/C# Windows Form application which uses the SDK to generate reports. I am using Visual Studio 2005. Early versions of my application used the Crystal Reports that is included with Visual Studio. I ran into a problem there that was fixed by moving to Crystal Reports XI. I am now using Crystal Reports XI Release 2 SP 3.6. I followed the steps in Note "1206112 - How to update a Crystal Reports XI Release 2 ClickOnce deployment package".

Frankly those instructions seemed strange to me because no changes were made to the product.xml file in regards to the checks made.

On the user's machines I have seen the following issues when they use ClickOnce to install or update my application:

  • Machines 1 and 2: ClickOnce decided it was not necessary to install Crystal Reports. User encountered a runtime error because the correct version was not installed. I cannot verify this anymore but I suspect they had an older version of Crystal Reports assemblies.

  • Machine 3 (and I suspect all machines): if you return to the ClickOnce webpage and install my program again it will install the Crystal Reports redistributable again and again... ClickOnce does not correctly understand that the redistributable has already been installed.

I first thought that the test of BuildNum against the value 240 just needed to be changed. However, on a clean machine (never had any Crystal Reports modules before) I installed the redistributable and it does not make the registry key HKLM\SOFTWARE\Business Objects\Suite 11.5\Crystal Reports" Value="BuildNum".

So what is an appropriate check to see if the redistributable for Crystal Reports XI Release 2 SP 3.6 has already been installed on a machine?

Below are the contents of my C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\CrystalReports\product.xml file:

Thank you for your time,

Steve Curry

<?xml version="1.0" encoding="utf-8" ?> 
- <Product xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper" ProductCode="BusinessObjects.CrystalReports115.NET.2.0"> 
- <!-- 
 Defines list of files to be copied on build 
--> 
- <PackageFiles CopyAllPackageFiles="false"> 
<PackageFile Name="CrystalRedist115_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\Business Objects\Suite 11.5\Crystal Reports" Value="BuildNum" /> 
</InstallChecks> 
- <Commands Reboot="Defer"> 
- <Command PackageFile="CrystalRedist115_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="240" /> 
- <!-- 
 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>