views:

159

answers:

1

I want to add an item to the context menu that appears when I click the right button of the mouse at a selected file in a directory. I don't know how to add it at a specified position of the menu, neither do I know how to separate it with lines above and below it.

Do I need to modify the registry? If so, what should I do?

+1  A: 

If you'd like to do this non-programmatically, you can simply make registry changes. For example, if you want to be able to start up Notepad on any DLL file with a command called "Edit", just add this to your registry:

[HKEY_CLASSES_ROOT\dllfile\shell]
[HKEY_CLASSES_ROOT\dllfile\shell\Edit]
[HKEY_CLASSES_ROOT\dllfile\shell\Edit\command]
@="notepad \"%L\""

Here is an article that explores in depth how to do this.

John Feminella
By doing this I can add an item to the context menu. But how can I add a seperate line under it?
I don't believe there's a way to do that which only uses the registry. You'd probably need a separate shell extension.
John Feminella