简体   繁体   中英

Windows registry - key for default Browser

I have a Win 7 64 bit machine. When I set FF or Chrome as the default browser it updates

HKCR.htm, HKCR.html and HKCR\\http

keys (and may be a few more) to point to the appropriate browser. However when I set IE to be the default browser none of these keys are updated.

I have a program that intends to open html files using the default browser. However this fails when IE is the default browser because the program checks for first two keys mentioned above.

Can someone tell me which keys to look for in order to determine the default browser?

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM