Windows – How to associate multiple context menu types for one file extension in the registry

context menufile extensionregeditwindows 7windows-registry

I want to add custom context menu options for certain file extensions (like .zip-files) for a program I'm developing.
However on many (but not all) PCs my software is going to be installed on 7-Zip is installed as well and therefore [HKEY_CLASSES_ROOT.zip] is referring to [HKEY_CLASSES_ROOT\7-Zip.zip] in the registry.

As I don't want to tamper with the original 7-Zip installation I just want to add my context menu options on top.
However entries in [HKEY_CLASSES_ROOT.zip\shell] are without effect and I don't know how I could link [HKEY_CLASSES_ROOT.zip] to [HKEY_CLASSES_ROOT\MyApp.zip] because the default value of [HKEY_CLASSES_ROOT.zip] is already being used by 7-Zip.

Any help would be greatly appreciated 🙂

Best Answer

If the .zip files are your only concern, you may safely use the [HKEY_CLASSES_ROOT\CompressedFolder] key.

This is because Windows natively uses this key for it's .zip-related functionality, and 3rd party software products (including 7zip) mostly tend to share this key with Microsoft. It allows the developers to add their own functionality while preserving the native Windows "folder-like" handling of .zip files.

It's weird though, that your [HKEY_CLASSES_ROOT\.zip] default value refers to [HKEY_CLASSES_ROOT\7-Zip.zip]. It is yet possible, that even those old versions set correct [HKEY_CLASSES_ROOT\CompressedFolder] entries - you'd have to check.

Related Question