Coffeehouse Thread

8 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Adding "Special" icons

Back to Forum: Coffeehouse
  • User profile image
    W3bbo

    'Lo

    I want to make the Firefox shortcut on my desktop a "real" desktop item, like the Internet Explorer shortcut is.

    I know it's possible, since my HP Scanner came with the "HP Share and Upload" pooware that got installed to my desktop.

    I couldn't find anything in the "Shell Programmer's Guide" in MSDN, any pointers?

  • User profile image
    ZippyV

    Outlook also manages to place such a shortcut (with a custom context menu) on the desktop. Probably something in the registry.
    I'm sure Mike will be able to answer your problem, where are you Mike? We need you!

  • User profile image
    rhm

    It's a good question. My theory is that it's witchcraft.

  • User profile image
    AndyC

    They're COM objects. I think you need to implement IShellFolder (and possibly IShellFolder2). MSDN probably has examples if you start from there...

  • User profile image
    W3bbo

    Outlook 2003 spared me from the destkop icon... no idea why they stopped though.

  • User profile image
    Sven Groot

    Probably the same reason why Windows XP doesn't have the IE, OE, My Computer, My Documents, Network Neighbourhood etc. on the desktop by default.

  • User profile image
    Mike Dimmick

    It looks like you have to implement a shell namespace extension. That seems to be how My Documents and Recycle Bin are implemented.

    You can see the registry entries for the IE extension at HKEY_CLASSES_ROOT\CLSID\{871C5380-42A0-1069-A2EA-08002B30309D}. I discovered this GUID by running RegMon, then using TweakUI to remove the icon. A value belonging to a key with that GUID was being set.

    See Creating a Shell Namespace Extension on MSDN. IE does have a couple of undocumented peculiarities. The first is that the ShellFolder\Attributes value is 0x24, but that 4 isn't documented here. Reading the ShObjIdl.h header indicates that 0x24 means SFGAO_CANLINK | SFGAO_CANDELETE. The first value indicates that the user can create shortcuts to it; the latter means the user can ask to delete it (because it uses the HideOnDesktopPerUser option, it will actually be hidden, not deleted).

    The other peculiarity is the option "WantsParseDisplayName". Presumably this refers to IShellFolder::ParseDisplayName. I can't find any documentation at all on this.

  • User profile image
    eddwo

    I attempted to hack up solution.

    This is purely registry tweaks, no code involved. There is no custom context menu, just a single command to launch the browser.

    Copy this into a reg file and install it.
    WARNING use at OWN RISK. This is not a real GUID.
    It probably doesn't work on other language versions, or if you installed firefox in a different location etc etc...

    Windows Registry Editor Version 5.00

    [HKEY_CLASSES_ROOT\CLSID\{e17d4fc8-5364-1fd1-83f2-00d0c93dc849}]
    "InfoTip"="This Should Launch Firefox"
    "LocalizedString"="Firefox"

    [HKEY_CLASSES_ROOT\CLSID\{e17d4fc8-5364-1fd1-83f2-00d0c93dc849}\DefaultIcon]
    @="\"%ProgramFiles%\\Mozilla Firefox\\firefox.exe\",0"

    [HKEY_CLASSES_ROOT\CLSID\{e17d4fc8-5364-1fd1-83f2-00d0c93dc849}\shell]
    @="OpenFirefox"

    [HKEY_CLASSES_ROOT\CLSID\{e17d4fc8-5364-1fd1-83f2-00d0c93dc849}\shell\OpenFirefox]
    @="Open &Firefox"

    [HKEY_CLASSES_ROOT\CLSID\{e17d4fc8-5364-1fd1-83f2-00d0c93dc849}\shell\OpenFirefox\Command]
    @=hex(2):22,00,25,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,00,69,00,6c,\
      00,65,00,73,00,25,00,5c,00,4d,00,6f,00,7a,00,69,00,6c,00,6c,00,61,00,20,00,\
      46,00,69,00,72,00,65,00,66,00,6f,00,78,00,5c,00,66,00,69,00,72,00,65,00,66,\
      00,6f,00,78,00,2e,00,65,00,78,00,65,00,22,00,00,00

    [HKEY_CLASSES_ROOT\CLSID\{e17d4fc8-5364-1fd1-83f2-00d0c93dc849}\ShellFolder]
    "Attributes"=dword:00000024
    "HideFolderVerbs"=""

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{e17d4fc8-5364-1fd

    1-83f2-00d0c93dc849}]
    @="Firefox"

    You can also drop a firefox icon anywhere else you feel like by creating a folder and renaming it to

    "Firefox.{e17d4fc8-5364-1fd1-83f2-00d0c93dc849}"

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.