Solved

detecting the default Web browser

Posted on 1997-06-03
1
225 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Server Express 2014 Master / Slave database replication 4 782
What are the big features of MVC5? 4 96
Problem to file 3 92
Visual Studio: built-in keystroke automation 2 82
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…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
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…

726 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