?
Solved

Detecting Internet Browsers from Delphi

Posted on 1998-11-22
6
Medium Priority
?
348 Views
Last Modified: 2010-04-04
I need to detect weather or not a system (running 95,98 or NT) has internet browsers installed, and if so which one the default one is.

I know it can be done in a web page, but I need to do it from a delphi App.
0
Comment
Question by:ggets
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 7

Expert Comment

by:BlackMan
ID: 1347604
First, check to see if the HTM extension is associated with a program. If it is, you can load the path of the program, that will handle HTM files and check for the browser name.
Example is here:

  Uses Registry;
  With TRegistry.Create Do
  Begin
    RootKey := HKEY_Classes_Root;
    OpenKeyReadOnly('.htm');
    ExtName := ReadString('');
    CloseKey;

    ExtName := ExtName + '\shell\open\command';
    OpenKeyReadOnly(ExtName);
    AppPath := ReadString('');
    CloseKey;

    ShowMessage(AppPath);
  End;

0
 
LVL 1

Expert Comment

by:Asw
ID: 1347605
Hi,

Try this code.

Use the ShellAPI function ShellExecute.

Example:

uses ShellAPI;

procedure TForm1.Button1Click(Sender: TObject);
begin
  ShellExecute(Form1.Handle,
               nil,
               'http://www.borland.com',
               nil,
               nil,
               SW_SHOWNORMAL);
end;
0
 
LVL 7

Expert Comment

by:BlackMan
ID: 1347606
Hmmm, Asw, that won't tell you what your default browser is, it will just start it...
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:ggets
ID: 1347607
Your solution will only run the browser. Not tell me if its installed not or not.(other that the fact that the command will fail). It is not acceptable to me to run the browser. I must just know if it is installed. I also need to know in more than one is installed and which the default one is. So far the closest answer is the one from blackman, however it will not return a list of installed browsers.
0
 
LVL 1

Accepted Solution

by:
sassas081597 earned 600 total points
ID: 1347608
Standart programs Like MS FrontPage detect the browsers looking for their names in Registry. So look in the registry if \HKey_Local_Machine\Software\Microsoft\Internet Explorer\Version exists and then read this version. The same way look for Netscape version. However if a third firm's browser is installed - then you cannot find it, except the way it it the default browser. For the default browser look the first comment to your answer.
0
 

Author Comment

by:ggets
ID: 1347609
Thanks - would like to share these points between Blackman & sassas. Is that possible? ( no points for answering that though)
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month15 days, 11 hours left to enroll

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question