Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

detecting the default Web browser

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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
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…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

609 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