473,383 Members | 1,846 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,383 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 1385
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.