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 /veAnd you will get something like:
(Default) REG_SZ "C:\Program Files (x86)\Internet Explorer\iexplore.exe"Then you can easily parse it.
5To 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.