Default browser?
Charlotte E. wrote:
Does anyone know how to read/find the current users default browser via
VBA?
(Internet Explorer, Google Chrome, Mozilla Firefox, Apple Safari, Opera
Browser, etc...)
I'm not talking about opening a website in the default browser, but
finding out which browser the current user is using as the default
one...
I'm guessing it must be somewhere in the Registry, under
HKEY_CURRENT_USER, since all users on the same computer are allowed to
have their own choice of default browser - but where?
A search on Google didn't help, but perhaps, I shouldn't get it from the
Registry at all???
So, how to tell which browser is the default one?
Under Windows 7 & 8 (and probably Vista & 8.1):
HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell \Associations
\UrlAssociations\http\UserChoice\ProgID
This points to an entry under HKEY_CLASSES_ROOT -- for example, in my Win8
install, it's "IE.HTTP", while in my Win7 install it's "Opera.Protocol".
Under Windows XP (and 2000, if you need to support it):
HKEY_CURRENT_USER\Software\Classes\http\shell\open \command
There's a different key used for what's listed on XP's start menu, but I
don't remember what it is. Google should know, if you need it.
Under Win9x & NT4 (if you need to support *those*):
HKEY_CLASSES_ROOT\http\shell\open\command
--
In life, they were a motley crew: farmers, lords, cutpurses, priests.
In death, they are united in a singular, benevolent purpose.
|