How to create ContextMenuHandlers key

May 13, 2010 at 12:04:06
Specs: Windows XP, 2.0 GHz, 512MB
How add my own subkey to the "HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers" key?

> How To Add A Subkey To The ""hkey_classes_root\director


I have XP-Pro SP2 (x86) and XP-Pro SP3 (x86) on my laptop and desktop respectively.

NOTE: When I use the term "Background context menu", I am referring to right clicking on an empty space
either on the Desktop or in a Windows Explorer window.

I would like to modify the background context menu to add a "Show Desktop"
option. I have add this option to the folders and files context menus by the following"


1. I wrote "Show Desktop.scf"and placed it in "C:\Program Files\Show Desktop"
2. I wrote "Show Desktop.BAT"and placed it in "C:\Program Files\Show Desktop"
3. I wrote "Show Desktop BOTH.reg", ran an merged it into the Registry.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Folder\shell\!Show Desktop]
@="!Show Desktop"

[HKEY_CLASSES_ROOT\Folder\shell\!Show Desktop\Command]
@="\"C:\\Program Files\\Show Desktop\\Show Desktop.BAT\""


[HKEY_CLASSES_ROOT\*\shell\Show Desktop]
@="Show Desktop"

[HKEY_CLASSES_ROOT\*\shell\Show Desktop\Command]
@="\"C:\\Program Files\\Show Desktop\\Show Desktop.BAT\""


This is thw "Show Desktop.BAT" used for the value for the Command subkey above:

start "" "C:\Program Files\Show Desktop\Show Desktop.scf"
exit

This is the "Show Desktop.scf" in the "Show Desktop.BAT" file above:

[Shell]
Command=2
IconFile="C:\Program Files\Show Desktop\Show Desktop.ico"
[Taskbar]
Command=ToggleDesktop

I tried adding the subkeys and values below to the "HKEY_CLASSES_ROOT\Directory\Background" key.
But it did not work.

[HKEY_CLASSES_ROOT\Directory\Background\shell]

[HKEY_CLASSES_ROOT\Directory\Background\shell\!Show Desktop]
@="!Show Desktop"

[HKEY_CLASSES_ROOT\Directory\Background\shell\!Show Desktop\Command]
@="\"C:\\Program Files\\Show Desktop\\Show Desktop.BAT\""

I see keys such as:

"HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\New"

that add items to thw Background context menu. So maybe someone here could show me how to add a subkey to this ContextMenuHandlers key that would add the "Show Desktop" to the Background context menu. Thank you.


See More: How to create ContextMenuHandlers key

Report •


#1
May 13, 2010 at 12:30:32
If you enable the 'Quick Launch' toolbar in the task Bar, the 'Show Desktop' icon should always be available there.

Right click an empty space on the Task Bar > Tools Bars > Quick Launch.

The three most important things in computing:
1. Backups, 2. Backups and 3. Backups.


Report •

#2
May 13, 2010 at 16:23:44
Thank you, however I am quite aware of the Show Desktop on the Quick Launch Bar. That is where I got the script. I am also aware of the WinKey+D and many other shortcuts to minimize all or show desktop. I want to find out how to add an item to the Background context menu. Although I would like the Show Desktop item, I really don't care if the item started "my_momma's.exe" I mainly would like to learn how to do it. I figure If I can find out how to run an application from that menu, then I could run a bunch of scripts if I chose by converting them to exe files. There are items added there by external applications I have installed.So if they can do then I should be able to as well.

Report •

#3
May 13, 2010 at 16:33:44
DON'T KNOW WHY MY POST NOW HAS LINES THROUGH THE CODE TEXT!

SO HERE IT IS AGAIN:

How to make a "ContextMenuHandlers" key


I have XP-Pro SP2 (x86) and XP-Pro SP3 (x86) on my laptop and desktop respectively.

How can I add a subkey to the "HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers" key?

I want to add "Show Desktop" to the "Background context menu"as I have done for the "HKEY_CLASSES_ROOT\Folder\shell" and the "HKEY_CLASSES_ROOT\*\shell" Registry keys.

How can I add this "Show Desktop" item to the Background Context Menu displayed wehen I right click on an empty space either on the desktop or in a Windows Explorer window?

I used the method outlined below to add the "Show Desktop" to the file and folders context menus'

1. I wrote "Show Desktop.scf"and placed it in "C:\Program Files\Show Desktop"
2. I wrote "Show Desktop.BAT"and placed it in "C:\Program Files\Show Desktop"
3. I wrote "Show Desktop BOTH.reg", ran an merged it into the Registry.

This is the "Show Desktop BOTH.reg"

Code:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Folder\shell\!Show Desktop]
@="!Show Desktop"

[HKEY_CLASSES_ROOT\Folder\shell\!Show Desktop\Command]
@="\"C:\\Program Files\\Show Desktop\\Show Desktop.BAT\""


[HKEY_CLASSES_ROOT\*\shell\Show Desktop]
@="Show Desktop"

[HKEY_CLASSES_ROOT\*\shell\Show Desktop\Command]
@="\"C:\\Program Files\\Show Desktop\\Show Desktop.BAT\""

This is the "Show Desktop.BAT" used for the value for the Command subkey above:

Code:

start "" "C:\Program Files\Show Desktop\Show Desktop.scf"
exit

This is the "Show Desktop.scf" in the "Show Desktop.BAT" file above:

Code:

[Shell]
Command=2
IconFile="C:\Program Files\Show Desktop\Show Desktop.ico"
[Taskbar]
Command=ToggleDesktop

I tried adding the subkeys and values below

Code:

[HKEY_CLASSES_ROOT\Directory\Background\shell]

[HKEY_CLASSES_ROOT\Directory\Background\shell\!Show Desktop]
@="!Show Desktop"

[HKEY_CLASSES_ROOT\Directory\Background\shell\!Show Desktop\Command]
@="\"C:\\Program Files\\Show Desktop\\Show Desktop.BAT\""

to the "HKEY_CLASSES_ROOT\Directory\Background" key.

But this failed.

I am thinking I have to make my own "ContextMenuHandlers" subkey because the subkeys there such as the one below do add items to the Background Context Menu

"HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\New"

So maybe someone here could show me how to create a "ContextMenuHandlers" subkey to add "Show Desktop"
to the Background Context Menu.. Thank you.


Report •

Related Solutions

#4
May 16, 2010 at 18:50:26
I thank everyone who has taken the time to offer
their help and suggestions. From the information presented here and on other forums I can see making my own "ContextMenuHandler" requires a much greater knowledge of programming than the meager amount
I possess. Rather than attempt to gain the necessary knowledge, I am going to abandon this project.
It is way too complicated. Again I thank all of you.

Report •

#5
December 8, 2010 at 16:47:53
Hello it's Transfer2pc.co.cc

ContextmenuHandlers require use of dll's.
If u use WinRAR see HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{B41DB860-8EE4-11D2-9906-E49FADC173CA}\InProcServer32


Report •


Ask Question