[GH-ISSUE #186] [FEATURE] it is possible to move path copy menu to top? #183

Open
opened 2026-02-25 21:32:49 +03:00 by kerem · 3 comments
Owner

Originally created by @iamqiz on GitHub (Dec 26, 2024).
Original GitHub issue: https://github.com/clechasseur/pathcopycopy/issues/186

Originally assigned to: @clechasseur on GitHub.

a shell/xxx context menu can be moved to top by adding position=top attribute,
it is possible to move shellex\ContextMenuHandlers\PathCopyCopy to top ?
thanks!

Originally created by @iamqiz on GitHub (Dec 26, 2024). Original GitHub issue: https://github.com/clechasseur/pathcopycopy/issues/186 Originally assigned to: @clechasseur on GitHub. a shell/xxx context menu can be moved to top by adding position=top attribute, it is possible to move shellex\ContextMenuHandlers\PathCopyCopy to top ? thanks!
Author
Owner

@clechasseur commented on GitHub (Dec 26, 2024):

I've found some documentation on how to do this for Shell verbs, but not for contextual menu extensions implemented through IContextMenu. Can you point me to documentation for this use case? Also, it seems that even the support for Shell verbs is somewhat unreliable, because if more than one verb uses the property, the last one wins.

<!-- gh-comment-id:2562957977 --> @clechasseur commented on GitHub (Dec 26, 2024): I've found some documentation on how to do this for Shell verbs, but not for contextual menu extensions implemented through `IContextMenu`. Can you point me to documentation for this use case? Also, it seems that even the support for Shell verbs is somewhat unreliable, because if more than one verb uses the property, the last one wins.
Author
Owner

@iamqiz commented on GitHub (Dec 26, 2024):

use case: I have many context menu for some file ext, so that the 'path copy' will be placed at bottom of menu, then i need to scroll my mouse whell to click it,😅 . if it is at the top,no need to scroll mouse.

if more than one verb uses the property, the last one wins.

yes, in that case , i will rename the verb to make it be last one , or add it into a cascading menu, ref: Creating Cascading Menus with the SubCommands Registry Entry

I'm not familiar with menu extensions , but I think it is possible to move shellex\ContextMenuHandlers\xx to top, for example, the reg file below can create a rename menu at top,

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\AllFilesystemObjects\shell\Windows.rename]
@="rename-top"
"InvokeCommandOnSelection"=dword:00000001
"position"="top"

it use predefined verb Windows.rename that is defined at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Windows.rename,
and this verb use command from dll ( HKEY_CLASSES_ROOT\CLSID\{81007291-f070-4c4f-b978-ad1bec84babc} ) ,
in link above, it say :

In the case of custom verbs, implement them using any of the static verb implementation methods and list them under the CommandStore subkey

so maybe we can create custom verb under CommandStore ,let that verb call command from dll,finally we add that verb to shell\ ?🧐

<!-- gh-comment-id:2563151328 --> @iamqiz commented on GitHub (Dec 26, 2024): use case: I have many context menu for some file ext, so that the 'path copy' will be placed at bottom of menu, then i need to scroll my mouse whell to click it,😅 . if it is at the top,no need to scroll mouse. > if more than one verb uses the property, the last one wins. yes, in that case , i will rename the verb to make it be last one , or add it into a cascading menu, ref: [Creating Cascading Menus with the SubCommands Registry Entry](https://learn.microsoft.com/en-us/windows/win32/shell/context-menu-handlers#creating-cascading-menus-with-the-subcommands-registry-entry) I'm not familiar with menu extensions , but I think it is possible to move shellex\ContextMenuHandlers\xx to top, for example, the reg file below can create a rename menu at top, ``` Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\AllFilesystemObjects\shell\Windows.rename] @="rename-top" "InvokeCommandOnSelection"=dword:00000001 "position"="top" ``` it use predefined verb `Windows.rename` that is defined at `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Windows.rename`, and this verb use command from dll ( `HKEY_CLASSES_ROOT\CLSID\{81007291-f070-4c4f-b978-ad1bec84babc}` ) , in link above, it say : >In the case of custom verbs, implement them using any of the static verb implementation methods and list them under the CommandStore subkey so maybe we can create custom verb under CommandStore ,let that verb call command from dll,finally we add that verb to shell\ ?🧐
Author
Owner

@clechasseur commented on GitHub (Dec 27, 2024):

Moving Path Copy Copy to using the new way(s) of adding contextual menu items added in Windows 7 would be a very good idea, but it's a pretty hefty refactoring. I'll leave this open to track this request if we get to that point in the future.

<!-- gh-comment-id:2563196096 --> @clechasseur commented on GitHub (Dec 27, 2024): Moving Path Copy Copy to using the new way(s) of adding contextual menu items added in Windows 7 would be a very good idea, but it's a pretty hefty refactoring. I'll leave this open to track this request if we get to that point in the future.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/pathcopycopy#183
No description provided.