I recently wanted to add a new command menu to my right click menu to have the possibility to securely delete files and directories using Sysinternals SDelete.
Using the MSDN documentation and Regedit I created a new menu item in my registry with a submenu containing my SDelete command.
I did this for the filetype
* as well as for
Directory in order to be able to delete files and directories. So far everything worked well and my new menu worked for files and folders.
However when I later wanted to open my profile using the Explorer jumplist in the taskbar, I realized that instead of opening my explorer it invoked my SDelete command on my profile (at that point in time I was glad I added a 5 second delay before the execution ;-)). Basically all Explorer jumplist entries behaved like that.
I tracked down the problem to my directory handler but still can't figure out the problem. You can reproduce the issue by saving the following code into a .reg file and execute it. Please only do so if you know how .reg files work and can manually undo the changes!
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\shell\sysinternals] "MUIVerb"="Testmenu" "SubCommands"="mySubCommand" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\mySubCommand] @="A Command that should do sth." [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\mySubCommand\command] @="cmd /K \"echo mySubCommand has been invoked\""
Can anybody tell me what I am doing wrong and how I can avoid this jumplist behavior?