How to detect using INNO?


Hello group,

In my installatino script (using INNO) I need to make sure if Excel is installed already or not. What is the method that I can detect it or any other application is installed?

Regards,
ak
akohanAsked:
Who is Participating?
 
zorvek (Kevin Jones)Connect With a Mentor ConsultantCommented:
Use the RegKeyExists function and look for any of the Excel installation keys.

From INNO help:

Prototype:
function RegKeyExists(const RootKey: Integer; const SubKeyName: String): Boolean;

Description:
Returns True if the specified registry key exists.

Example:
begin
  if RegKeyExists(HKEY_CURRENT_USER, 'Software\Jordan Russell\Inno Setup') then
  begin
    // The key exists
  end;
end;

Kevin
0
 
zorvek (Kevin Jones)ConsultantCommented:
For example, Excel 2003 installs this key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0\Excel

Kevin
0
 
akohanAuthor Commented:


Hi Kevin,

the 11.0 stands for the Excel version. right? I'm afraid if a user has 2007 Excel installed then can I trust this path or should I conisder other steps ?


Regards,
ak
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
zorvek (Kevin Jones)ConsultantCommented:
I'm not certain but I believe 2007 is 12.0.

Kevin
0
 
zorvek (Kevin Jones)ConsultantCommented:
  < 8  then Excel 95 or earlier
   = 8 then Excel 97
   = 9 then Excel 2000
   = 10 then Excel 2002 or XP
   = 11 then Excel 2003

Kevin
0
 
akohanAuthor Commented:

Kevin,


Thank yoiu so much. I need to ask you another question but have to open a new question. I'm hoping you will find it.

Regards,
ak
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.