Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7704129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:36:56+00:00 2026-05-31T23:36:56+00:00

Is there a common method/api to list all web browsers (name, executable, default yes/no)

  • 0

Is there a common method/api to list all web browsers (name, executable, default yes/no) installed on my machine (and per user), and how to find out which is the default web browser?

I have seen this question: How to find all the browsers installed on a machine

And on MSDN: How to Register an Internet Browser or Email Client With the Windows Start Menu which states that web-browsers should register themselves under HKLM\SOFTWARE\Clients\StartMenuInternet (and HKCU)

Is that really the common/correct approach? (And if yes, any solid implementation out there?)


My goal is to create a drop-down menu with a list of all web-browsers installed on user’s machine (indicating the default), and allow the user to browse his HTML file/URLs with one of the external web-browser available.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T23:36:57+00:00Added an answer on May 31, 2026 at 11:36 pm

    You could do something like

    procedure ListRegisteredBrowsers(List: TStrings);
    var
      reg: TRegistry;
      ki: TRegKeyInfo;
      i: Integer;
      keyname: string;
      len: DWORD;
    begin
      reg := TRegistry.Create;
      try
        reg.RootKey := HKEY_LOCAL_MACHINE;
        if not Reg.KeyExists('\SOFTWARE\Clients\StartMenuInternet') then Exit;
        if not Reg.OpenKey('\SOFTWARE\Clients\StartMenuInternet', false) then
          raise Exception.Create('ListRegisteredBrowsers: Could not open registry key.');
        if not reg.GetKeyInfo(ki) then
          raise Exception.Create('ListRegisteredBrowsers: Could not obtain registry key information.');
        List.Clear;
        SetLength(keyname, len);
        for i := 0 to ki.NumSubKeys - 1 do
        begin
          len := ki.MaxSubKeyLen + 1;
          if RegEnumKeyEx(reg.CurrentKey, i, PChar(keyname), len, nil, nil, nil, nil) <> ERROR_SUCCESS then
            RaiseLastOSError;
          if reg.OpenKey('\SOFTWARE\Clients\StartMenuInternet\' + keyname, false) then
            List.Add(reg.ReadString(''));
          Reg.OpenKey('\SOFTWARE\Clients\StartMenuInternet', true);
        end;
      finally
        reg.Free;
      end;
    end;
    

    and

    function GetDefaultBrowser: string;
    var
      reg: TRegistry;
    begin
      result := '';
      reg := TRegistry.Create;
      try
        reg.RootKey := HKEY_CURRENT_USER;
        if Reg.OpenKey('\SOFTWARE\Clients\StartMenuInternet', false) then
          result := reg.ReadString('')
        else
        begin
          reg.RootKey := HKEY_LOCAL_MACHINE;
          if Reg.OpenKey('\SOFTWARE\Clients\StartMenuInternet', false) then
            result := reg.ReadString('')
        end;
        reg.RootKey := HKEY_LOCAL_MACHINE;
        if Reg.OpenKey('\SOFTWARE\Clients\StartMenuInternet\' + result, false) then
          result := reg.ReadString('');
      finally
        reg.Free;
      end;
    end;
    

    Test it:

    procedure TForm1.Button1Click(Sender: TObject);
    var
      sl: TStringList;
      i: Integer;
      DefBrw: string;
    begin
      DefBrw := GetDefaultBrowser;
      sl := TStringList.Create;
      try
        ListRegisteredBrowsers(sl);
        Memo1.Lines.BeginUpdate;
        for i := 0 to sl.Count - 1 do
          if SameText(sl[i], DefBrw) then
            Memo1.Lines.Add(sl[i] + ' (Default)')
          else
            Memo1.Lines.Add(sl[i]);
        Memo1.Lines.EndUpdate;
      finally
        sl.Free;
      end;
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Evening, Is there a common or standardised name given to a function or method
Is there a Apache Commons / Log4J logging API method which can be used
Is there in the JDK or Jakarta Commons (or anywhere else) a method that
Are there any Common Lisp implementations for .Net?
Is there a common way to get the current time in or with milliseconds?
Is there a common way to express the usage of arguments in C++? I
Is there a common standard for reporting errors in your class functions? I've seen
Is there a common interface in Python that I could derive from to modify
There's a common way to store multiple values in one variable, by using a
In Java there are a bunch of methods that all have to do with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.