Path variable for default browser in Windows

Some files or folders in Windows have path variables (like %appdata%, %systemroot%, %userprofile%, etc). Is there anything similar to get the default browser?

For example, it could take the value C:\Program Files\Google\Chrome\Application\chrome.exe if Google Chrome is the default browser, C:\Program Files\Mozilla Firefox\firefox.exe if Firefox is the default browser, C:\Program Files\Internet Explorer\iexplore.exe if Internet Explorer is the default browser, etc and always have the same name no matter what.

2 Answers

You can use:

reg QUERY HKEY_CLASSES_ROOT\htmlfile\shell\open\command /ve

And you will get something like:

(Default) REG_SZ "C:\Program Files (x86)\Internet Explorer\iexplore.exe"

Then you can easily parse it.

5

To get the info about the default browser, you need to check the Windows registry.

You can find more info about this here :

Also you might won to check this to.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like