6

I'd like to edit the context menu options for 7zip in the Windows File Explorer.

More precisely, I'd like to replace Add to archive... by &Add to archive to be able to use a keyboard shortcut like APPS KEY +A to open this.

In which regedit keys/values should this be done? In:

HKEY_CLASSES_ROOT\Folder\ShellEx\ContextMenuHandlers\7-Zip

I see:

{23170F69-40C1-278A-1000-000100020000}

Then in HKEY_CLASSES_ROOT\CLSID\{23170F69-40C1-278A-1000-000100020000}, I only see a link to the 7zip DLL file.

I know the usual method to set context menu options with:

HKEY_CLASSES_ROOT\*\shell\Action x\command

where I can set the command and also modify the text in the menu. But here with 7zip how to modify this menu item text? Adding & before Add to archive... will underline the letter A, and will enable A as a keyboard shortcut.

More info in Keyboard shortcut for 7z "Add to archive...".

2 Answers 2

6

I know the usual method to set context menu options with:

No, that's one of the usual methods.

Then in HKEY_CLASSES_ROOT\CLSID{23170F69-40C1-278A-1000-000100020000}, I only see a link to the 7zip DLL file.

All 7-Zip context menu options are defined in this DLL file – they are not static; they depend on what kind of file you right-clicked, so a DLL function is invoked every time Windows needs to show the menu and decides whether to insert each of the available options.

To actually change what a DLL file does, normally you'd have to find its source code, then edit and recompile it. However, as the menu labels are stored as string resources in the DLL (and not embedded in code), you might have luck with Resource Hacker or similar tools that directly edit EXE/DLL embedded resources.

You can find the 7-Zip source code at SourceForge, though here's a more easily browsable copy on GitHub – among other things, the DLL has functions that implement the IContextMenu COM interface expected by Explorer.

2
  • 2
    In addition, you can of course also create a custom entry under HKCR\CLSID\7-Zip.7z and add a 2nd item to the list with the action you want to do. This will not change the 7-zip menu or options, but it will allow you to press the letter you give it. Alternatively, you can configure the double-click option there as well and replace it with the extract command. You would need to do this for all file extensions you want this feature to be present at.
    – LPChip
    Commented Dec 14, 2021 at 8:52
  • @user1686 Is ResourceHacker a trusted well-known tool? What are the most trusted alternatives?
    – Basj
    Commented Jan 17, 2022 at 7:55
0

I had the same issue and searched for the App-UID of 7-zip, {23170F69-40C1-278A-1000-000100020000}

That brought up the following Reg Value, that seems to disable the registered z-zip DLL, by that preventing the context menu entries to show up in Windows Explorer:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked]
"{23170F69-40C1-278A-1000-000100020000}"=""

I deleted that value, uninstalled 7-zip, installed the latest version (currently 7z2301-x64.msi), no reboot was requested, the context menu of z-zip still did not show up.

After a reboot everything was fine. Note: Reboots were done before several times, no change, until this registry value was deleted

This registry value did exist at the same time, the "Blocked" one was in place:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved]
"{23170F69-40C1-278A-1000-000100020000}"="7-Zip Shell Extension"

So it looks like, that entries in "Blocked" override those in "Approved"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .