Solved

detecting the default Web browser

Posted on 1997-06-03
1
215 Views
Last Modified: 2013-12-03
I'm trying to dig up documentation on how to detect the default Web browser in a Win95 app.  I've trolled the registry in search of where this gets set but can't seem to locate it.  Is it as simple as looking in HKEY_CLASSES_ROOT\.htm?  Once I determine the browser, where do I look for the application path (e.g. to launch the browser).  Does this differ based on browser?

Help is appreciated.

0
Comment
Question by:JanetG
1 Comment
 
LVL 1

Accepted Solution

by:
val_m earned 50 total points
ID: 1397842
You almost got it right.  Look in HKEY_CLASSES_ROOT\.htm (or .html, your choice).  Get the value of 'default' key (which is on my computer is "htmlfile").  Now open the key you got from 'default'  (EX: HKEY_CLASSES_ROOT\htmlfile ).  That's where all the information about the default browser is.  
I'll go with my example (eg 'htmlfile')

The following are the registry keys you need
(default programs used to open, create and edit htm /html files).
If you need the command to open the file (ie full path and filename of browser):
 HKEY_CLASSES_ROOT\htmlfile\shell\open\command 'Default' Key.
To edit the file
 HKEY_CLASSES_ROOT\htmlfile\shell\edit\command
'Default' Key

To create a file
 HKEY_CLASSES_ROOT\htmlfile\shell\new\command
'Default'

To print a file
 HKEY_CLASSES_ROOT\htmlfile\shell\print\command
'Default'

That is assuming you have html/htm editor.
 
Note: Depending on the browser, the key name I have marked as htmlfile might be different.  Make sure to start with .htm key to get an actual key to use.  Example above works with Netscape and IE.

vmushinskiy@earthlink.net
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now