Indigo Rose Software
  #1  
Old 07-13-2000
dburrill dburrill is offline
Forum Member
 
Join Date: Jul 2000
Location: Sydney, NSW, Australia
Posts: 3
Grin Shortcut to default browser

HELP!

How do I install an icon onto the desktop that points to the user's default browser?

This will probably require querying the Registry.

Thanks for any help.

  #2  
Old 07-14-2000
John Schacher John Schacher is offline
Forum Member
 
Join Date: May 2000
Location: Hillsboro, OR - USA
Posts: 19
Re: Shortcut to default browser

You're right about requiring a lookup in the registry. You'd want to refer to the .htm file association which is a two part registry query.

First, query for the default value of .htm file extension in HKEY_CLASSES_ROOT.
Ex:
HKEY_CLASSES_ROOT\.htm
(Default)="htmlfile"

Next, take this default value as the key to look for in HKEY_CLASSES_ROOT. This is where windows store all the intesting information. In your case, you'd want to look for the default value of the Open Command subkey.
Ex:
HKEY_CLASSES_ROOT\htmlfile\shell\open\command
(Default)="\"E:\\Program Files\\Internet Explorer\\iexplore.exe\" -nohome"

Take this value and set a shortcut to the same string.

A word of caution: When using this technique, once your application has installed, if the user installs a different browser, your shortcut may no longer be valid because the .htm file association may point to a different browser. This risk may be acceptable in your situation.

An alternative technique: You could install a placeholder .htm file on the users local system (it could point to somewhere interesting or simply be empty). Set a shortcut to this placeholder file. As you know, clicking the shortcut would simply launch the local .htm file and let Windows do the registry lookup at runtime. This would always invoke the default browser, even if the user installed a different one after your application installed.

Hope this helps,
-John

  #3  
Old 07-16-2000
dburrill dburrill is offline
Forum Member
 
Join Date: Jul 2000
Location: Sydney, NSW, Australia
Posts: 3
Re: Shortcut to default browser

Thanks very much for your help.

Most appreciated.

Best Regards,

Duncan

 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is On



All times are GMT -6. The time now is 09:16 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software