Andromo - Start Making Apps - Free Signup



New Forum Software

If you're here, you've found the new home for our forums. There will be some bugs to iron out, so thanks for your patience...
See more
See less

Shortcut to default browser

This topic is closed.
  • Filter
  • Time
  • Show
Clear All
new posts

  • Shortcut to default browser


    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
    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.

    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.
    (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,


    • #3
      Re: Shortcut to default browser

      Thanks very much for your help.

      Most appreciated.

      Best Regards,