Solved

detecting the default Web browser

Posted on 1997-06-03
1
218 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
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…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
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…

920 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

13 Experts available now in Live!

Get 1:1 Help Now