Advertisement
TLama

Untitled

Oct 16th, 2014
542
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.68 KB | None | 0 0
  1. [Setup]
  2. ; no ArchitecturesInstallIn64BitMode directive is used here, Inno Setup is so in 32-bit mode
  3.  
  4. [Code]
  5. const
  6.   CrystalReportsKey = 'SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports';
  7.  
  8. function IsCrystalReportsInstalled: Boolean;
  9. begin
  10.   // return True if we are on 64-bit system and there's a CR key under the 64-bit registry view or under the 32-bit view,
  11.   // or if we are not on 64-bit system and there's a CR key (under the only view which 32-bit system provides)
  12.   Result := (IsWin64 and (RegKeyExists(HKLM64, CrystalReportsKey) or RegKeyExists(HKLM32, CrystalReportsKey))) or
  13.     (not IsWin64 and RegKeyExists(HKLM, CrystalReportsKey));
  14. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement