473,320 Members | 1,746 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to check system default browser?

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
Jul 27 '05 #1
3 1379
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

Jul 27 '05 #2
"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/>

Jul 27 '05 #3
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

Jul 28 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

27
by: mrbog | last post by:
Tell me if my assertion is wrong here: The only way to prevent session hijacking is to NEVER store authentication information (such as name/password) in the session. Well, to never authenticate...
2
by: Phil Stanton | last post by:
When designing a new form or report, the Default ForeColor is often something like -2147483640 which is the colour of Windows text (possibly black) and the default backColor is -2147483643...
3
by: Tee | last post by:
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...
2
by: chuckdfoster | last post by:
Is there a way to check if MS Outlook is installed on a client PC from ASP.NET?
3
by: HK guy | last post by:
How to write a program that can check the web page loading time? Before I have written a browser that use IE as the core, but it does not support frame. Since the documentcomplete event will...
2
by: Ed Staffin | last post by:
In Internet Explorer under the tools/internet options menu on the general tab, there is a settings button under Temporary internet files. In there the user can specify when to "Check for newer...
11
by: John McMonagle | last post by:
Is there a python module which can determine an operating system's default web browser application. I would like to use it in the following context: I have a GUI application where all the...
44
by: user | last post by:
Hi, Let's say I have 2 dates in the b/m format: Date 1 and date 2 How do I check whether Date2 is later than Date 1? Date1. 21-Nov-2006 09:00:00 PM
11
by: Patrick | last post by:
Trying this question again in a different way and expanding it to another newsgroup. Looking for how I would do this. For an html form; Say I have three check boxes A, B, and C . When I click...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.