![]() You can fall back to Process.Start(url) if registry access fails for some reason, but be prepared for that Win32 exception. Basically your file association ProdID MUST match the Adobe version hash. In a repro we found that either having no ProdID or a randomized ProdID, then opening a PDF with Chrome, Chrome would then be the default PDF application. Now I can Process.Start(path, url) to safely launch the default browser. A new Hash value in Windows 10 is also added to UserChoice key. HKEY_LOCAL_MACHINE\Software\Clients\StartMenuInternet\ chrome.exe\shell\open\command The path to my default browser is in this key: The default value from StartMenuInternet (either HKCU or HKLM) is the subkey to look for. There is a set of subkeys under HKEY_LOCAL_MACHINE\Software\Clients\StartMenuInternet that contain details about each registered browser. The default value here is the system default browser (on my system it's FIREFOX.EXE). If the user hasn't set a default then check HKEY_LOCAL_MACHINE\Software\Clients\StartMenuInternet. ![]() Both ways it will show up in chrome://policy but does not seem to do anything. There is the appropriate default browser reg entry in HKCUSoftwarePoliciesGoogleChrome But I have tried the GPO through Local Machine policy as well and it didnt work. This key will only exist if the user has overridden the system default browser - the default value is used to access the details (for me, it's chrome.exe). There is no entry for HKLMSoftwarePoliciesGoogle. Lots of people suggest looking up the HTTP handler in HKEY_CLASSES_ROOT but this is flawed as well - on my system for instance HTTP is registered to Firefox even though I'm actually using Chrome and I'd be unhappy waiting half an hour for Firefox to wake up and show the requested web page.įrom XP there are a couple of registry settings tied to the current user's preferred browser.įirst check HKEY_CURRENT_USER\Software\Clients\StartMenuInternet. If you use Process.Start("url") it will work some of the time but you'll see a "The system cannot find the file specified" Win32Exception on some systems.
0 Comments
Leave a Reply. |