I want to add a custom context menu item to Windows Explorer in Windows 10, so that when I right-click on certain types of file, I can run a particular application on the file. I have found various guides on the web with similar solutions to the StackOverflow question Add menu item to Windows Context Menu only for specific filetype.
From what I understand, if I want the context menu to appear for .JPG
files, I check the registry and find that Win10 gives these the jpegfile
type. I need to use regedit
to add the registry key HKEY_LOCAL_MACHINE\Software\Classes\jpegfile\shell\myapp\command
, and set its default value to the path to my app.
Unfortunately, this doesn't seem to work: I don't see any new context menu item. Also, I noticed in the registry that another menu item had previously been added for jpegfile
(Open in GIMP). It doesn't work either, so I presume it's not just me failing to follow the instructions properly. I've checked that the paths are correct for both my app and the GIMP executable. I have also tried both a standard right-click and a shift-right-click to display the context menu.
- Is there some trick to getting this style of context menu to display?
- Has something changed in Windows 10, so that this type of hack no longer works? If so, is there an alternative method?
- Could something else be inhibiting display of these menu items? Where should I start looking?
.jpeg
AND.jpg
associated withjpegfile
. Context menus registry entries are valid on the extension as well. And use HKEY_CURRENT_USER as settings there will override local machine. HKEY_CLASSES_ROOT is a merged view of User and System..jpeg
and.jpg
were associated withjpegfile
. I tried setting the key on the extension directly too, and that didn't work either.