How to create your own nameless Desktop Icons with Enhanced Context Menus


The easiest way is editing an existing reg file.

In this Tutorial I'm going to edit "Add Neowin.reg".

When you edit the reg file you should see something like this:

Windows Registry Editor Version 5.00

;Neowin Without Text by Herby
[HKEY_CLASSES_ROOT\CLSID\{00000000-5140-0000-0000-000000000002}]
"InfoTip"="Neowin.net - Where unprofessional journalism looks better."
"NeverShowExt"=""
@=""

[HKEY_CLASSES_ROOT\CLSID\{00000000-5140-0000-0000-000000000002}\DefaultIcon]
@="%WinDir%\\Icons\\Neowin.ico"

[HKEY_CLASSES_ROOT\CLSID\{00000000-5140-0000-0000-000000000002}\Shell]

[HKEY_CLASSES_ROOT\CLSID\{00000000-5140-0000-0000-000000000002}\Shell\00]
@="&Neowin.net"

[HKEY_CLASSES_ROOT\CLSID\{00000000-5140-0000-0000-000000000002}\Shell\00\Command]
@=hex(2):25,00,57,00,69,00,6e,00,44,00,69,00,72,00,25,00,5c,00,53,00,79,00,73,\
 00,74,00,65,00,6d,00,33,00,32,00,5c,00,52,00,75,00,6e,00,64,00,6c,00,6c,00,\
 33,00,32,00,2e,00,65,00,78,00,65,00,20,00,55,00,72,00,6c,00,2c,00,46,00,69,\
 00,6c,00,65,00,50,00,72,00,6f,00,74,00,6f,00,63,00,6f,00,6c,00,48,00,61,00,\
 6e,00,64,00,6c,00,65,00,72,00,20,00,68,00,74,00,74,00,70,00,3a,00,2f,00,2f,\
 00,77,00,77,00,77,00,2e,00,6e,00,65,00,6f,00,77,00,69,00,6e,00,2e,00,6e,00,\
 65,00,74,00,2f,00,00,00  

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[HKEY_CLASSES_ROOT\CLSID\{00000000-5140-0000-0000-000000000002}\Shell\14]
@="View &Headlines"

[HKEY_CLASSES_ROOT\CLSID\{00000000-5140-0000-0000-000000000002}\Shell\14\Command]
@=hex(2):25,00,57,00,69,00,6e,00,44,00,69,00,72,00,25,00,5c,00,53,00,79,00,73,\
 00,74,00,65,00,6d,00,33,00,32,00,5c,00,52,00,75,00,6e,00,64,00,6c,00,6c,00,\
 33,00,32,00,2e,00,65,00,78,00,65,00,20,00,55,00,72,00,6c,00,2c,00,46,00,69,\
 00,6c,00,65,00,50,00,72,00,6f,00,74,00,6f,00,63,00,6f,00,6c,00,48,00,61,00,\
 6e,00,64,00,6c,00,65,00,72,00,20,00,68,00,74,00,74,00,70,00,3a,00,2f,00,2f,\
 00,77,00,77,00,77,00,2e,00,6e,00,65,00,6f,00,77,00,69,00,6e,00,2e,00,6e,00,\
 65,00,74,00,2f,00,61,00,72,00,63,00,68,00,69,00,76,00,65,00,2e,00,70,00,68,\
 00,70,00,00,00

[HKEY_CLASSES_ROOT\CLSID\{00000000-5140-0000-0000-000000000002}\ShellFolder]
"Attributes"=hex:00,00,00,00

;Add Neowin to Desktop
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{00000000-5140-0000-0000-000000000002}]


All reg parts explained:

;Neowin Without Text by Herby

Everything behind ; is ignored by regedit and is just for information.

[HKEY_CLASSES_ROOT\CLSID\{00000000-5140-0000-0000-000000000002}]

This is the CLSID address.
You must change this address everytime you create a new one.
In this example we are going to change it to {00000000-5240-0000-0000-000000000002}.

"InfoTip"="Neowin.net - Where unprofessional journalism looks better."

The system displays this InfoTip when the mouse hovers over the Icon.
You can change the value to anything you want.

"NeverShowExt"=""

This part makes sure that the (CLSID) extension is invisible (in Windows Explorer).

@=""

This is why the Icon has no name.
If you want to give it a name change the value "" to "AnyNameYouWant".

[HKEY_CLASSES_ROOT\CLSID\{00000000-5140-0000-0000-000000000002}\DefaultIcon]
@="%WinDir%\\Icons\\Neowin.ico"


This part specifies the value for the icon from the object.

[HKEY_CLASSES_ROOT\CLSID\{00000000-5140-0000-0000-000000000002}\Shell\00]
@="&Neowin.net"


This part specifies the name off the first (00) and Default command (the command that is executed when you click on the Icon).
The letter behind the & is the underlined letter for Keyboard navigation.

[HKEY_CLASSES_ROOT\CLSID\{00000000-5140-0000-0000-000000000002}\Shell\01]
@="• Log &In"


This part specifies the name off the second (01) command.

[HKEY_CLASSES_ROOT\CLSID\{00000000-5140-0000-0000-000000000002}\Shell\00\Command]
@=hex(2):25,00,57,00,69,00,6e,00,44,00,69,00,72,00,25,00,5c,00,53,00,79,00,73,\
00,74,00,65,00,6d,00,33,00,32,00,5c,00,52,00,75,00,6e,00,64,00,6c,00,6c,00,\
33,00,32,00,2e,00,65,00,78,00,65,00,20,00,55,00,72,00,6c,00,2c,00,46,00,69,\
00,6c,00,65,00,50,00,72,00,6f,00,74,00,6f,00,63,00,6f,00,6c,00,48,00,61,00,\
6e,00,64,00,6c,00,65,00,72,00,20,00,68,00,74,00,74,00,70,00,3a,00,2f,00,2f,\
00,77,00,77,00,77,00,2e,00,6e,00,65,00,6f,00,77,00,69,00,6e,00,2e,00,6e,00,\
65,00,74,00,2f,00,00,00


This is the Command that is gonna be executed.
It's an Expandable String Value: According to the Microsoft DevStudio's Network (MSDN), an expandable string registry value is a null-terminated string that contains unexpanded references to environment variables (for example, “%UserProfile%”).
When you edit this line with Regedit you'll see; "%WinDir%\System32\Rundll32.exe Url,FileProtocolHandler http://www.neowin.net"/ (opens Neowin.net in your default browser).
I used an Expandable String Value because of path/location differences in different language versions of Windows.
For example %ProgramFiles% opens the Program Files directory in every language version of Windows, even when you installed Windows on your D: drive.
You can also use a String Value which is easier to edit:
[HKEY_CLASSES_ROOT\CLSID\{00000000-5140-0000-0000-000000000002}\Shell\00\Command]
@="C:\\Windows\\System32\\Rundll32.exe Url,FileProtocolHandler http://www.neowin.net"/

The command needs to run via an exe file; for example when you want to open a folder you must open it with explorer:
@="Explorer.exe C:\\Windows\\System32\\DllCache"
or an txt file: @="Rundll32.exe Url,FileProtocolHandler C:\\Windows\\system32\\eula.txt" opens eula.txt with your default text editor.

[HKEY_CLASSES_ROOT\CLSID\{00000000-5140-0000-0000-000000000002}\ShellFolder]
"Attributes"=hex:00,00,00,00


The Attributes value is a binary value that enables adding or removing the objects' context menu options (like cut, copy paste, rename & delete).
More info @ http://www.virtualplastic.net/html/ui_shell.html#attributes.

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{00000000-5140-0000-0000-000000000002}]

This key adds the Icon to the Desktop.
You can also add the Icon to My Computer:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{00000000-5140-0000-0000-000000000002}]
to the Control Panel:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\{00000000-5140-0000-0000-000000000002}]
& to My Network Places:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\NetworkNeighborhood\NameSpace\{00000000-5140-0000-0000-000000000002}]


Editing the reg file:

Start with changing the CLSID address:
{00000000-5140-0000-0000-000000000002} to {00000000-5240-0000-0000-000000000002}
You have to change all the lines (also the one that adds the icon to the Desktop).

Edit the InfoTip:
"Neowin.net - Where unprofessional journalism looks better." to "Any InfoTip you want"

Change the Icon:
@="%WinDir%\\Icons\\Neowin.ico" to for example @="C:\\Program Files\\Windows Media Player\\wmplayer.exe,0" which changes the Icon to the first (Default) Icon of Windows Media Player or to @="%SystemRoot%\\System32\\Shell32.dll,15" which changes the Icon to the "My Computer" Icon.

Edit the names of the commands:
[HKEY_CLASSES_ROOT\CLSID\{00000000-5240-0000-0000-000000000002}\Shell\00]
@="&Neowin.net"

This is the first and Default command name.
Change @="&Neowin.net" to the command name you want: @="&Open Temp Dir"

[HKEY_CLASSES_ROOT\CLSID\{00000000-5140-0000-0000-000000000002}\Shell\01]
@="• Log &In"

This is the second command name, change it to for example @="&Device Manager"

Delete unnesasery commands:
In this example we only need 2 commands so you can delete the rest:
[HKEY_CLASSES_ROOT\CLSID\{00000000-5140-0000-0000-000000000002}\Shell\02] until
[HKEY_CLASSES_ROOT\CLSID\{00000000-5140-0000-0000-000000000002}\ShellFolder]

Save the reg file as "Add Example.reg".

Now you should see something like this:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\CLSID\{00000000-5240-0000-0000-000000000002}]
"InfoTip"="Any InfoTip you want"
"NeverShowExt"=""
@=""

[HKEY_CLASSES_ROOT\CLSID\{00000000-5240-0000-0000-000000000002}\DefaultIcon]
@="C:\\Program Files\\Windows Media Player\\wmplayer.exe,0"

[HKEY_CLASSES_ROOT\CLSID\{00000000-5240-0000-0000-000000000002}\Shell]

[HKEY_CLASSES_ROOT\CLSID\{00000000-5240-0000-0000-000000000002}\Shell\00]
@="&Open Temp Dir"

[HKEY_CLASSES_ROOT\CLSID\{00000000-5240-0000-0000-000000000002}\Shell\00\Command]
@=hex(2):25,00,57,00,69,00,6e,00,44,00,69,00,72,00,25,00,5c,00,53,00,79,00,73,\
 00,74,00,65,00,6d,00,33,00,32,00,5c,00,52,00,75,00,6e,00,64,00,6c,00,6c,00,\
 33,00,32,00,2e,00,65,00,78,00,65,00,20,00,55,00,72,00,6c,00,2c,00,46,00,69,\
 00,6c,00,65,00,50,00,72,00,6f,00,74,00,6f,00,63,00,6f,00,6c,00,48,00,61,00,\
 6e,00,64,00,6c,00,65,00,72,00,20,00,68,00,74,00,74,00,70,00,3a,00,2f,00,2f,\
 00,77,00,77,00,77,00,2e,00,6e,00,65,00,6f,00,77,00,69,00,6e,00,2e,00,6e,00,\
 65,00,74,00,2f,00,00,00

[HKEY_CLASSES_ROOT\CLSID\{00000000-5240-0000-0000-000000000002}\Shell\01]
@="&Device Manager"

[HKEY_CLASSES_ROOT\CLSID\{00000000-5240-0000-0000-000000000002}\Shell\01\Command]
@=hex(2):25,00,57,00,69,00,6e,00,44,00,69,00,72,00,25,00,5c,00,53,00,79,00,73,\
 00,74,00,65,00,6d,00,33,00,32,00,5c,00,52,00,75,00,6e,00,64,00,6c,00,6c,00,\
 33,00,32,00,2e,00,65,00,78,00,65,00,20,00,55,00,72,00,6c,00,2c,00,46,00,69,\
 00,6c,00,65,00,50,00,72,00,6f,00,74,00,6f,00,63,00,6f,00,6c,00,48,00,61,00,\
 6e,00,64,00,6c,00,65,00,72,00,20,00,68,00,74,00,74,00,70,00,3a,00,2f,00,2f,\
 00,77,00,77,00,77,00,2e,00,6e,00,65,00,6f,00,77,00,69,00,6e,00,2e,00,6e,00,\
 65,00,74,00,2f,00,66,00,6f,00,72,00,75,00,6d,00,2f,00,69,00,6e,00,64,00,65,\
 00,78,00,2e,00,70,00,68,00,70,00,3f,00,61,00,63,00,74,00,3d,00,4c,00,6f,00,\
 67,00,69,00,6e,00,26,00,43,00,4f,00,44,00,45,00,3d,00,30,00,30,00,00,00

[HKEY_CLASSES_ROOT\CLSID\{00000000-5240-0000-0000-000000000002}\ShellFolder]
"Attributes"=hex:00,00,00,00

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{00000000-5240-0000-0000-000000000002}]


Edit the commands:
There are 2 ways to edit these commands:

1) Edit the reg file and change the command to a String Value:
Change
[HKEY_CLASSES_ROOT\CLSID\{00000000-5240-0000-0000-000000000002}\Shell\00\Command]
@=hex(2):25,00,57,00,69,00,6e,00,44,00,69,00,72,00,25,00,5c,00,53,00,79,00,73,\
00,74,00,65,00,6d,00,33,00,32,00,5c,00,52,00,75,00,6e,00,64,00,6c,00,6c,00,\
33,00,32,00,2e,00,65,00,78,00,65,00,20,00,55,00,72,00,6c,00,2c,00,46,00,69,\
00,6c,00,65,00,50,00,72,00,6f,00,74,00,6f,00,63,00,6f,00,6c,00,48,00,61,00,\
6e,00,64,00,6c,00,65,00,72,00,20,00,68,00,74,00,74,00,70,00,3a,00,2f,00,2f,\
00,77,00,77,00,77,00,2e,00,6e,00,65,00,6f,00,77,00,69,00,6e,00,2e,00,6e,00,\
65,00,74,00,2f,00,00,00

to
[HKEY_CLASSES_ROOT\CLSID\{00000000-5240-0000-0000-000000000002}\Shell\00\Command]
@="C:\\Windows\\Explorer.exe C:\\Windows\\Temp"

and
[HKEY_CLASSES_ROOT\CLSID\{00000000-5240-0000-0000-000000000002}\Shell\01\Command]
@=hex(2):25,00,57,00,69,00,6e,00,44,00,69,00,72,00,25,00,5c,00,53,00,79,00,73,\
00,74,00,65,00,6d,00,33,00,32,00,5c,00,52,00,75,00,6e,00,64,00,6c,00,6c,00,\
33,00,32,00,2e,00,65,00,78,00,65,00,20,00,55,00,72,00,6c,00,2c,00,46,00,69,\
00,6c,00,65,00,50,00,72,00,6f,00,74,00,6f,00,63,00,6f,00,6c,00,48,00,61,00,\
6e,00,64,00,6c,00,65,00,72,00,20,00,68,00,74,00,74,00,70,00,3a,00,2f,00,2f,\
00,77,00,77,00,77,00,2e,00,6e,00,65,00,6f,00,77,00,69,00,6e,00,2e,00,6e,00,\
65,00,74,00,2f,00,66,00,6f,00,72,00,75,00,6d,00,2f,00,69,00,6e,00,64,00,65,\
00,78,00,2e,00,70,00,68,00,70,00,3f,00,61,00,63,00,74,00,3d,00,4c,00,6f,00,\
67,00,69,00,6e,00,26,00,43,00,4f,00,44,00,45,00,3d,00,30,00,30,00,00,00

to
[HKEY_CLASSES_ROOT\CLSID\{00000000-5240-0000-0000-000000000002}\Shell\01\Command]
@="C:\\Windows\\System32\\mmc.exe /s /a C:\\Windows\\System32\\devmgmt.msc"


Save the reg file.

2) Edit the commands in the Registry:
Import "Add Example.reg".
Open Regedit (Start -> Run... -> Regedit) and search (Edit -> Find) for the CLSID {00000000-5240-0000-0000-000000000002}.
Expand {00000000-5240-0000-0000-000000000002}, expand Shell, expand 00 and select Command.
In the right pane you should see:
(Default) | REG_EXPAND_SZ | %WinDir%\System32\Rundll32.exe Url,FileProtocolHandler http://www.neowin.net/
Double click on (Default) and change the value data to Explorer.exe %Temp%
Expand 01 and select Command.
Double click on (Default) on the right pane and change the value to mmc.exe /s /a %WinDir%/System32/devmgmt.msc
Now right click on the CLSID {00000000-5240-0000-0000-000000000002}, select Export and save the file as Temp.reg.
Edit temp.reg, copy everything and paste it into "Add Example.reg" and overwrite everything exept the last line (the one that adds the Icon to the Desktop).

Save the reg file.


Editing the Remove reg file:

Edit "Remove Neowin.reg" and change 5140 from both the CLSID's to 5240.
You should see this:

Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\CLSID\{00000000-5240-0000-0000-000000000002}]

[-HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{00000000-5240-0000-0000-000000000002}]


Save the file as "Remove Example.reg"
This reg file removes all the lines you edited / created and removes the Icon from the Desktop.

I hope this helps you all!

[/Herby]