Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 3 of 3
  1. #1
    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. #2
    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. #3
    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


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts