Solved

Detecting Internet Browsers from Delphi

Posted on 1998-11-22
6
345 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
Independent Software Vendors: 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 200 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

Technology Partners: 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!

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

707 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