creating shell icons (ex: recycle bin)
A shell icon is sort of like a file type (ex: .doc, .txt .bmp etc) but it is
made for a system feature. For example, the recycle bin. The recycle bin, unlike
allot of your desktop icons, is not a shortcut. It is a shell icon. "My
documents", "my computer" , "internet exploder" are other shell icons.
But how about making your own? That would be cool eh? Well it's possible, here's
how:
First, go in your registry and browse in the HKEY_CLASSES_ROOT and find the key
CLSID. This is where all the nifty shell stuff is. Create a new key. Call it
"{D46C1FE2-7F18-41D0-6250-848C1D003400}". Note that this is random, just use the
same thing throughout the whole tutorial if you decide to change the numbers,
just don?t use anything already in use by windows ? this one is not in use. You
also can?t use a simple word, it has to be in this format.
In the key, create a new string value called InfoTip. This is what you will get
when your mouse hovers on it, and when you click on it from within explorer
(click on control panel in my computer, and you will notice the yellow text on
the side). So for the value you can just put something like ?my shell icon!?
Optional is to create a DWORD called SortOrderIndex, this is to order it on your
desktop, the bigger the number, the more on the bottom of the list it will be.
In the key "{D46C1FE2-7F18-41D0-6250-848C1D003400}" create another key called "DefaultIcon"
and in the default string put a path to any icon. You can specify a dll file and
icon number. for the recycle bin icon, you would put %SystemRoot%\System32\shell32.dll,31
Change the number 31 to something else to go through the icons available in
shell32.dll. You can also open it up with a resource editor. In fact, you can
open up any exe file with a resource editor to find some nice goodies.
Now again in ?{D46C1FE2-7F18-41D0-6250-848C1D003400}". ? create another key
called ?shell?. In ?shell? create a key of your choice, such as ?open?. In
?open? create a key called ?command? and in the default string value for
command, write a path to a program, the same way you would to associate a file
type with a program.
Now, browse down to ?HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Cur
rentVersion\Explorer\MyComputer\NameSpace?
In ?namespace? create a key called ?{D46C1FE2-7F18-41D0-6250-848C1D003400}". ?
If you chose something else at the start instead of
?{D46C1FE2-7F18-41D0-6250-848C1D003400}". ? use that. It has to be the same as
the main key you created in CLSID earlier. You should then see your shell icon
appear in my computer. You can also add it to the control panel or even the
desktop by going to the right key under Explorer.
With what is shown here, this is a useless icon but you can always add a bunch
of shell keys so you can right click and get all your most frequency used
programs under one menu, or something. There is way more to this, since stuff
like the recycle bin also use dll files so that it works the way it does, but I
won?t get into that? play around those areas of the registry, and you?ll
discover allot about shell icons and stuff like that.