How to edit context menu of Windows Explorer (Win XP)

  • Thread starter Thomas Schuster
  • Start date
T

Thomas Schuster

Hi,

not sure if this is the appropriate newsgroup to ask that question, but
any help is appreciated.

I would like to add a new entry to windows explorer context menu, in the
meantime I figured out that I can add entries by editing some registry
keys, for example: "HKCR\*\shell\..."

Unfortunately those entries are only shown if I do a right click on a
file. On the other hand I would like to open an empty folder (so that
there is nothing to mark but just the possibilty to) right click
somewhere within that empty folder and choose my new entry from context
menu.

Does somebody know which registry key I would have to add to get that
done? Thanks a lot!
 
R

Ramesh, MS-MVP

Thomas,

When you right-click on an empty space in a folder window, the shell extensions defined in the following registry locations load:

HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers

To add an additional context menu item in the above location, you'll have to write (program) a shell extension - context menu handler. Adding static menu items in the above location is not possible in Windows XP.

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows Shell/User]
Windows® Troubleshooting http://www.winhelponline.com


Hi,

not sure if this is the appropriate newsgroup to ask that question, but
any help is appreciated.

I would like to add a new entry to windows explorer context menu, in the
meantime I figured out that I can add entries by editing some registry
keys, for example: "HKCR\*\shell\..."

Unfortunately those entries are only shown if I do a right click on a
file. On the other hand I would like to open an empty folder (so that
there is nothing to mark but just the possibilty to) right click
somewhere within that empty folder and choose my new entry from context
menu.

Does somebody know which registry key I would have to add to get that
done? Thanks a lot!
 
T

Thomas Schuster

Ramesh said:
Thomas,


When you right-click on an empty space in a folder window, the shell extensions defined in the following registry locations load:

HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers

To add an additional context menu item in the above location, you'll have to write (program) a shell extension - context menu handler. Adding static menu items in the above location is not possible in Windows XP.
Thanks for your quick reply.

I was writing a vb script that should be used in context menu. If I got
that correct something like a command entry that calls my script
wouldn't work at this point. So my question would be, can you recommend
any readings as introduction to shell extensions?
 
R

Ramesh, MS-MVP

introduction to shell extensions?

These references should help.

Creating Shell Extension Handlers:
http://msdn.microsoft.com/library/d...int_extending/extensionhandlers/shell_ext.asp

O'Reilly Media -- Bookstore: VB Shell Programming:
http://www.oreilly.com/catalog/vbshell/

Shell Extension Interfaces v1.01 (SHLEXT.tlb):
http://www.vbaccelerator.com/home/VB/Type_Libraries/Shell_Extension_Interfaces/article.asp

Visual Basic Shell Programming: Chapter 4: Context Menu Handlers:
http://www.oreilly.com/catalog/vbshell/chapter/ch04.html

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows Shell/User]
Windows® Troubleshooting http://www.winhelponline.com


Thomas Schuster said:
Thomas,


When you right-click on an empty space in a folder window, the shell extensions defined in the following registry locations load:

HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers

To add an additional context menu item in the above location, you'll have to write (program) a shell extension - context menu handler. Adding static menu items in the above location is not possible in Windows XP.
Thanks for your quick reply.

I was writing a vb script that should be used in context menu. If I got
that correct something like a command entry that calls my script
wouldn't work at this point. So my question would be, can you recommend
any readings as introduction to shell extensions?
 
T

Thomas Schuster

Ramesh said:
These references should help.

Creating Shell Extension Handlers:
http://msdn.microsoft.com/library/d...int_extending/extensionhandlers/shell_ext.asp

O'Reilly Media -- Bookstore: VB Shell Programming:
http://www.oreilly.com/catalog/vbshell/

Shell Extension Interfaces v1.01 (SHLEXT.tlb):
http://www.vbaccelerator.com/home/VB/Type_Libraries/Shell_Extension_Interfaces/article.asp

Visual Basic Shell Programming: Chapter 4: Context Menu Handlers:
http://www.oreilly.com/catalog/vbshell/chapter/ch04.html
Looks good, thanks!
 
R

Ramesh, MS-MVP

You're welcome!

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows Shell/User]
Windows® Troubleshooting http://www.winhelponline.com


Thomas Schuster said:
These references should help.

Creating Shell Extension Handlers:
http://msdn.microsoft.com/library/d...int_extending/extensionhandlers/shell_ext.asp

O'Reilly Media -- Bookstore: VB Shell Programming:
http://www.oreilly.com/catalog/vbshell/

Shell Extension Interfaces v1.01 (SHLEXT.tlb):
http://www.vbaccelerator.com/home/VB/Type_Libraries/Shell_Extension_Interfaces/article.asp

Visual Basic Shell Programming: Chapter 4: Context Menu Handlers:
http://www.oreilly.com/catalog/vbshell/chapter/ch04.html
Looks good, thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top