Advertisement
TLama

Untitled

Oct 15th, 2014
514
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 1.24 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. ...
  9. begin
  10.   // if we are on 64-bit system
  11.   if IsWin64 then
  12.   begin
  13.     // if the key is found in 32-bit registry view, it means that a 32-bit CR is installed on the
  14.     // system (if the CR does it so; that's what I don't know); HKLM32 == HKLM in 32-bit mode Inno
  15.     // Setup, so you can write HKLM here (but HKLM32 better explains what is done here)
  16.     if RegKeyExists(HKLM32, CrystalReportsKey) then
  17.       MsgBox('32-bit Crystal Reports found.', mbInformation, MB_OK);
  18.     else
  19.     // if the key is found in 64-bit registry view, it means that a 64-bit CR is installed on the
  20.     // system (that's the case on your system)
  21.     if RegKeyExists(HKLM64, CrystalReportsKey) then
  22.       MsgBox('64-bit Crystal Reports found.', mbInformation, MB_OK);
  23.   end
  24.   else
  25.     // we are not on 64-bit system, so there is only one, 32-bit view, which is mapped as HKLM in
  26.     // 32-bit mode Inno Setup
  27.     if RegKeyExists(HKLM, CrystalReportsKey) then
  28.       MsgBox('32-bit Crystal Reports found.', mbInformation, MB_OK);
  29. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement