Imsa
Imsa

Reputation: 1125

Find default browser Windows 8.1 programmatically

I am trying to find a way to see what is the default browser of machine (Windows 8.1 and Windows 10 specifically) programtically.

Is there a registry key that holds the value of what is default browser?

Upvotes: 0

Views: 512

Answers (2)

Omar
Omar

Reputation: 190

Take a look at the registry key Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice

It will list what is the default browser for HTTP protocal. Likewise, you can check for HTTPS, HTMl and such.

Good starting point.

Upvotes: 2

balduran
balduran

Reputation: 132

You should read

HKEY_CURRENT_USER\SOFTWARE\Clients\StartMenuInternet
HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet

If user didn't change default browser away from IE, this registry key under HKEY_CURRENT_USER won't exist. So, check HKEY_CURRENT_USER first. If not such key/value, check HKEY_LOCAL_MACHINE as fallback.

If the value isn't IEXPLORE.EXE, the default browser isn't IE.

reference: https://msdn.microsoft.com/en-us/library/windows/desktop/dd203067%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396

Upvotes: 0

Related Questions