How to find default web browser using C#?

前端 未结 7 1075
长发绾君心
长发绾君心 2020-11-27 05:07

Is there a way I can find out the name of my default web browser using C#? (Firefox, Google Chrome, etc..)

Can you please show me with an example?

7条回答
  •  半阙折子戏
    2020-11-27 05:49

    This is getting old, but I'll just add my own findings for others to use. The value of HKEY_CURRENT_USER\Software\Clients\StartMenuInternet should give you the default browser name for this user.

    If you want to enumerate all installed browsers, use HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet

    You can use the name found in HKEY_CURRENT_USER to identify the default browser in HKEY_LOCAL_MACHINE and then find the path that way.

提交回复
热议问题