473,399 Members | 4,192 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,399 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
Nov 21 '05 #1
3 4873
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
"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
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 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...
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: 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...
2
by: chuckdfoster | last post by:
Is there a way to check if MS Outlook is installed on a client PC from ASP.NET?
8
by: typingcat | last post by:
Microsoft Internet Explorer sends a user agent string contains .NET Framework version if it is installed. But not all the users use MSIE. Some people use FireFox or Opera. Is there any way to check...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.