moudey / Shell

Powerful context menu manager for Windows File Explorer
https://nilesoft.org
MIT License
3.62k stars 121 forks source link

Multiple entries with the same title #300

Closed BergenSoft closed 1 year ago

BergenSoft commented 1 year ago

DropBox is generating 2 menu entries with the german title "Dropbox-Link kopieren" on my system. I'm not sure why this could happen. Is there a way to show only one of them?

RubicBG commented 1 year ago

I found a way to get rid of the duplicate Dropbox commands. But I can't say that this is a universal method that can be used every time. But if you follow the logic that is described, it will be possible to achieve:

  1. The problem: With Windows 11, the new "modern" context menu appeared. The Show More Options command still allows you to use the legacy context menu. The addition of sub-menus and commands is different for each of the menus, both modern and legacy: the main difference is that registry settings and dll file registration do not appear in the modern menu. Dropbox has a solution for both types of menus - for the modern menu everything is OK, but for some reason both solutions appear in the legacy menu

  2. legacy context menu: It uses dll files to display all the menus. For me they are DropboxExt.62.0.dll and DropboxExt64.62.0.dll (C:\Program Files (x86)\Dropbox\Client) The name of the files may be different, as well as their location. This version supports the following commands:

210, "&Share..." 211, "Share this file/folder with others" 212, "View in &Dropbox" 213, "View this file/folder in Dropbox" 214, "Copy Dropbox &link" 215, "Copy a Dropbox link to this file/folder to your clipboard." 216, "Make available offline" 217, "Make online-only" 218, "Version history" 219, "View the history of changes to this file/folder" 220, "Lock" 221, "Unlock" 222, "Sync Now" 223, "Get more space" 224, "Move to Dropbox" 225, "Move to Dropbox (Business)" 226, "Send with Dropbox Transfer" 227, "Send with Dropbox Transfer (Business)" 228, "Lock Vault" 231, "Send for signature" 232, "Back up to Dropbox..." 233, "Request files..." 234, "Manage Backup..." 235, "Pause Backup" 236, "Resume Backup" 237, "Don't sync to Dropbox.com" 238, "Sync to Dropbox.com"

and in German:

210, "&Teilen\xA0..." 211, "Diese Datei/diesen Ordner mit anderen teilen" 212, "In &Dropbox ansehen" 213, "Diese Datei/diesen Ordner in Dropbox ansehen" 214, "Dropbox-&Link kopieren" 215, "Kopieren Sie einen Dropbox-Link zu dieser Datei/diesem Ordner in die Zwischenablage." 216, "Offline verf\xFCgbar machen" 217, "Nur online" 218, "Versionsverlauf" 219, "\xC4nderungsverlauf f\xFCr diese Datei/diesen Ordner ansehen" 220, "Sperren" 221, "Entsperren" 222, "Just synchronize" 223, "Mehr Speicherplatz" 224, "After Dropbox verschieben" 225, "After Dropbox verschieben (Business)" 226, "Mit Dropbox Transfer senden" 227, "Mit Dropbox Transfer senden (Business)" 228, "Datentresor sperren" 231, "Zum Unterzeichnen senden" 232, "In Dropbox sichern\xA0..." 233, "Dateien anfragen\xA0..." 234, "Manage Backup\xA0..." 235, "Backup hold" 236, "Backup fortsetzen" 237, "Nicht mit Dropbox.com synchronisieren" 238, "Mit Dropbox.com synchronisieren"

The entire block of menus: {ECD97DE5-3C8F-4ACB-AEEE-CCAB78F7711C}

  1. modern context menu: To add new sub-menus and commands Windows "requires" Signing MSIX Package - a method I am not very aware of. (more info here: https://www.youtube.com/watch?v=LfBQm-FY-2I and https://github.com/xandfis/W11ContextMenuDemo). There are several xml files in Dropbox.msix (C:\Program Files (x86)\Dropbox\Client\PackageAssets) (.msix files can be unpacked or opened with an archiver like WinRAR). AppxManifest.xml contains all the Dropbox sub-menu information for the modern context menu:

{F3BC3DAF-431B-4F0E-B105-E9BB76335840} Id="Dropbox01UpgradeCommand" {7F4C5B83-2680-40AF-9AE9-2161AA759EF2} Id="Dropbox02ShareCommand" {5B08737B-ABBA-47F5-B30E-F09D24936792} Id="Dropbox03BrowseCommand" {3340B3D7-438C-4FC9-81BF-8D9D81B05730} Id="Dropbox04CopyLinkCommand" {E6903B9A-4B63-4E3F-AA55-7F3A10DBB0CD} Id="Dropbox05RecallCommand" {0430E2DE-632B-4AD1-8F62-A53D61AE9C63} Id="Dropbox06EvictCommand" {C36518B0-11CD-40D6-B932-170857D4372B} Id="Dropbox07SyncNowCommand" {6B1D84A8-94F1-402C-99A4-11A124C8D9C9} Id="Dropbox08HistoryCommand" {4A44CAD7-6868-443B-9CFB-5F559C6A9493} Id="Dropbox09LockCommand" {3BE3580D-276A-4304-B39F-C64A32CE5D4E} Id="Dropbox10UnlockCommand" {DF6BE21B-3501-4D6D-A3C8-3BE1F15C501F} Id="Dropbox11LockVaultCommand" {69CCED92-A3BF-44C6-9C54-BC0D6D3EF212} Id="Dropbox12UnlockVaultCommand" {014C361B-BA8A-4D2F-A281-8EB837002EC1} Id="Dropbox13SignCommand" {EC4F2D9F-847C-4923-898C-073AAB74EFE0} Id="Dropbox14RequestFilesCommand" {28C8436D-F17B-4388-B097-B5F8C3681D1B} Id="Dropbox15ManageBackupCommand" {419D5796-E6AB-4761-AA5B-185C4B26DE74} Id="Dropbox16PauseBackupCommand" {84D423F5-D599-4F0C-8DDD-93BF146EF6AF} Id="Dropbox17ResumeBackupCommand" {89370F74-CECE-4591-899F-43F2C99D4F13} Id="Dropbox18IgnoreCommand"

{95C5E6AC-93FA-4234-8301-1B3D5424AA6B} Id="Dropbox1MoveCommand" {646E22C5-CD0B-44CE-9570-82165CCDA505} Id="Dropbox1MoveWorkCommand" {8BAA20BD-6EE8-40B6-A512-8B2C8A1B2935} Id="Dropbox2TransferCommand" {B165B4C7-D18D-4C23-B46C-380E219BA5B9} Id="Dropbox2TransferWorkCommand" {67CA84CB-DE8C-47EE-9F3B-48123B1C634C} Id="Dropbox3SetupBackupCommand" {A8B20E50-2D95-43C6-BDAC-1B00C4721A2F} Id="Dropbox19UnignoreCommand"

  1. Solution - You have to play around a bit:
    • removal of block of commands for legacy context menu remove(clsid='{ECD97DE5-3C8F-4ACB-AEEE-CCAB78F7711C}' where=!this.isuwp)
    • removal of folding commands for the modern context menu remove(clsid='{F3BC3DAF-431B-4F0E-B105-E9BB76335840}|{95C5E6AC-93FA-4234-8301-1B3D5424AA6B}' where=!this.isuwp) It is not necessary to list all the clsid - when selecting a clsid from the list, it will not be displayed, but all the others below it in the order in which I have described them.

the remove() function has been around since debug build 33

moudey commented 1 year ago

An option will be provided that will allow you to remove duplicate items.