0

I have follow this guide @ http://www.howtogeek.com/107965/how-to-add-any-application-shortcut-to-windows-explorers-context-menu/ to create a context menu in my registry.

May I know is it possible to include the menu for All File Types EXCEPT Shortcuts (those with lnk extension)?

Currently I am using the All File Types method (HKEY_CLASSES_ROOT*\shell ) but it also appear for shortcuts (.lnk file) as well.

Please advise.

2 Answers 2

1

One possible solution could be to overwrite the menu for lnk files by creating an entry with same key name on HKEY_CLASSES_ROOT\lnkfile\shell. For example, if All File Types menu is

[HKEY_CLASSES_ROOT\*\shell\DateTimeTool]
@="DateTime Tool"

then the new value will be

[HKEY_CLASSES_ROOT\lnkfile\shell\DateTimeTool]
@="DateTime Tool (for shortcut)"

This is not going to delete the entry, but it is going to give you the path of the shortcut instead of the referenced file.

0

The program you've set up is opening the targets of those .lnk shortcuts, not the .lnk files themselves, correct? If so, that's as it should be. When opening a shortcut, you should expect it to be treated as if were the target file itself.

As for excluding certain file extensions, it's not going to be possible if you're setting it for all filetypes via the wildcard * key.

I've had this same registry hack set up with a text editor for years. It's great to have some "open with" consistency.

By the way, you can give it an icon: inside your "open with" key, create a new string named "Icon" and set it to your program or icon path.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .