Cascading Menu and File Explorer Jump Lists Issue in Windows 10

When you implement Cascading Menus in File Folders (Directory) using the SubCommands or ExtendedSubCommands registry keys in Windows 10, an interesting thing happens. The last item in your Cascading menu gets executed when you right-click Pinned File Explorer shortcut in the Taskbar, and click on a folder in the Jump List, instead of a folder window opening.

(This bug was first reported at Microsoft Answers forum, and you can see my response there. As it was later reported by two other users, I decided to write a blog post on this.)

Sample REG file to Reproduce the Issue

Copy the following contents to Notepad, save as "mymenu.reg", and run it.

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\directory\shell\CustomMenu] "Icon"="shell32.dll,39" "MUIVerb"="MyMenu" "SubCommands"="" [HKEY_CLASSES_ROOT\directory\shell\CustomMenu\shell\menu1] "Icon"="c:\\windows\\system32\\cmd.exe,0" @="Command Prompt" [HKEY_CLASSES_ROOT\directory\shell\CustomMenu\shell\menu1\command] @="cmd.exe \"%1\"" [HKEY_CLASSES_ROOT\directory\shell\CustomMenu\shell\menu2] "Icon"="c:\\windows\\system32\\cmd.exe,0" @="Run Maintenance (Batch File)" [HKEY_CLASSES_ROOT\directory\shell\CustomMenu\shell\menu2\command] @="D:\\Tools\\maintenance.bat"

The cascading menu will show up and work perfectly fine when you right-click a file folder.

Bug: The problem occurs when you right-click on the File Explorer Pinned item in the Taskbar and click on a folder in the Jumplist. Instead of opening a folder window, the last command in your Cascading menu (in this example, "Run Maintenance") gets executed. This is a bug!

Workaround #1

Implementing the Cascading menu under "Folders" or "AllFileSystemObjects" registry key should not cause this problem. However, when implemented in Folders or AllFileSystemObjects registry area, the menu would show up for virtual folders like This PC, Recycle Bin etc as well as for Compressed Folders and files. To prevent it from appearing for files, virtual folders and Compressed (zipped) folders, add a check by creating the AppliesTo REG_SZ value in your Cascading menu.



Set AppliesTo value data to:

kind:file folder AND System.FileExtension:<>".zip"

Revised Registry Settings

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Folder\shell\CustomMenu] "Icon"="shell32.dll,39" "MUIVerb"="MyMenu" "SubCommands"="" "AppliesTo"="kind:file folder AND System.FileExtension:<>\".zip\"" [HKEY_CLASSES_ROOT\Folder\shell\CustomMenu\shell\menu1] "Icon"="c:\\windows\\system32\\cmd.exe,0" @="Command Prompt" [HKEY_CLASSES_ROOT\Folder\shell\CustomMenu\shell\menu1\command] @="cmd.exe \"%1\"" [HKEY_CLASSES_ROOT\Folder\shell\CustomMenu\shell\menu2] "Icon"="c:\\windows\\system32\\cmd.exe,0" @="Run Maintenance (Batch File)" [HKEY_CLASSES_ROOT\Folder\shell\CustomMenu\shell\menu2\command] @="D:\\Tools\\maintenance.bat"

Workaround #2

In the Sample REG file at the top of the article, include a 3rd menu command which launches Explorer %1.

[HKEY_CLASSES_ROOT\directory\shell\CustomMenu\shell\menu3\command]
@="explorer.exe \"%1\""

But it will always show up in your Cascading menu.. When you select a folder in the Jumplist, this item (last in the menu) is executed.

About the author

Ramesh Srinivasan founded Winhelponline.com back in 2005. He is passionate about Microsoft technologies and he has been a Microsoft Most Valuable Professional (MVP) for 10 consecutive years from 2003 to 2012.

Leave a Comment