For Programmers: Free Programming Magazines  


Home > Archive > Visual Basic > November 2005 > Is it possible to detect installed browsers?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Is it possible to detect installed browsers?
Lisa Forde

2005-11-24, 9:55 pm

Hi. I'm wondering if it's possible to detect, find out, what browsers are
installed on your system.

Thanks


MikeD

2005-11-24, 9:55 pm


"Lisa Forde" <1forde@caribsurf.com> wrote in message
news:11ocqo9f8pbm5a0@corp.supernews.com...
> Hi. I'm wondering if it's possible to detect, find out, what browsers are
> installed on your system.



I'm sure it is (if no other way, check the Registry for installed apps), but
why do you actually need to detect installed browsers?

Are you just trying to open a file in a browser? If so, use the ShellExecute
API function. For extensions associated with a browser, this will
automatically open the file in the user's default browser (which is probably
what the user would prefer, even if the user has 2 or more browsers
installed). Actually, ShellExecute will open any file with whatever app is
associated with the file's extension. That's almost always a much better way
to open a file than to try and detect what apps are installed.

--
Mike
Microsoft MVP Visual Basic


Lisa Forde

2005-11-25, 3:55 am

I am developing an application where I need to give the user the option of
which browser on the system to use so I thought maybe if I could detect the
browsers on the system, I could list them in a combobox or somethign from
the user could choose.

Thanks

"MikeD" <nobody@nowhere.edu> wrote in message
news:%23cVq7XW8FHA.3544@TK2MSFTNGP09.phx.gbl...
>
> "Lisa Forde" <1forde@caribsurf.com> wrote in message
> news:11ocqo9f8pbm5a0@corp.supernews.com...
are[color=darkred]
>
>
> I'm sure it is (if no other way, check the Registry for installed apps),

but
> why do you actually need to detect installed browsers?
>
> Are you just trying to open a file in a browser? If so, use the

ShellExecute
> API function. For extensions associated with a browser, this will
> automatically open the file in the user's default browser (which is

probably
> what the user would prefer, even if the user has 2 or more browsers
> installed). Actually, ShellExecute will open any file with whatever app is
> associated with the file's extension. That's almost always a much better

way
> to open a file than to try and detect what apps are installed.
>
> --
> Mike
> Microsoft MVP Visual Basic
>
>



mayayana

2005-11-25, 6:55 pm

You can look under
HKLM\Software\Microsoft\Windows\CurrentV
ersion\App Paths\
for the EXE-named key. The default value should be the
path to the EXE file, which can then be called to open the
file. (If I remember correctly, earlier versions of Mozilla don't
respond properly to being Shell-ed, but the rest should.)
Some EXEs:

Netscape 4 - "netscape.exe"
Mozilla - "Mozilla.exe"
Opera - "Opera.exe"
Netscape 7 - "Netscp.exe"
Netscape 6 - "Netscp6.exe"
Firefox - "Firefox.exe"

So, for example, you should find Netscape 7 under -

HKLM\Software\Microsoft\Windows\CurrentV
ersion\App Paths\Netscp.exe

If the key is missing it's not installed.

--
mayayanaXX1a@mindXXspring.com
(Remove Xs for return email.)
Lisa Forde <1forde@caribsurf.com> wrote in message
news:11od5oerr19l28c@corp.supernews.com...
> I am developing an application where I need to give the user the option of
> which browser on the system to use so I thought maybe if I could detect

the
> browsers on the system, I could list them in a combobox or somethign from
> the user could choose.
>
> Thanks
>
> "MikeD" <nobody@nowhere.edu> wrote in message
> news:%23cVq7XW8FHA.3544@TK2MSFTNGP09.phx.gbl...
> are
> but
> ShellExecute
> probably
is[color=darkred]
> way
>
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com