?
Solved

detecting the default Web browser

Posted on 1997-06-03
1
Medium Priority
?
232 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 100 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
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…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

862 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