By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,713 Members | 1,338 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,713 IT Pros & Developers. It's quick & easy.

How to check system default browser?

P: n/a
Tee
Hi,

I need to open a .xml file with system default browser.
But whenever I open the file using Process.Start, it will open the default
program that handles .xml.

Anyone knows how to detect the default browser so I can use it to open the
..xml?
Thanks,
Tee
Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies

P: n/a
Tee,

One idea would be to read the registry the application handling the file
type htm or html. With Windows XP, this registry key is (for html files)

HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts\.html\OpenWithList

That's not very elegant but it should work.

Fabien.
"Tee" <th*@streamyx.com> a écrit dans le message de news:
%2****************@TK2MSFTNGP14.phx.gbl...
Hi,

I need to open a .xml file with system default browser.
But whenever I open the file using Process.Start, it will open the default
program that handles .xml.

Anyone knows how to detect the default browser so I can use it to open the
.xml?
Thanks,
Tee

Nov 21 '05 #2

P: n/a
"Tee" <th*@streamyx.com> schrieb:
I need to open a .xml file with system default browser.
But whenever I open the file using Process.Start, it will open the default
program that handles .xml.

Anyone knows how to detect the default browser so I can use it to open the
.xml?


You could determine the application which is associated with the ".html"
extension, for example:

Determining a file's associated application
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=findassociatedapp&lang=en>

'Process.Start(<file name>)' will open the application associated with the
file type of the file you pass to the 'Start' method automatically.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3

P: n/a
Tee
Thanks for the help guys.
"Tee" <th*@streamyx.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hi,

I need to open a .xml file with system default browser.
But whenever I open the file using Process.Start, it will open the default
program that handles .xml.

Anyone knows how to detect the default browser so I can use it to open the
.xml?
Thanks,
Tee

Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.