Tip: Organise and Speed-Up Context Menus

Tips to rearrange the context menus you see when right-clicking files.

There are a few ways you can tackle the problem, depending on how much you want to hide/show.

(Re-written Nov 2023.)

You can do this with both old and new versions of Opus. Things that only work in newer versions are marked as such.


Hide particular handlers (Opus 13 & above only)

  • Settings > Preferences
    • Miscellaneous > Shell Extensions
      - Context Menu -- for normal software
      - Context Menu (UWP) -- for Microsoft Store software

If the software you want to exclude is there, right-click it and choose Block.


Hide everything

To remove most context menu items from other software in one click:

Opus 12:

  • Settings > Preferences
    • Miscellaneous > Windows Integration
      • Hide Windows items on file context menus (shift overrides)

Opus 13:

  • Settings > Preferences
    • Miscellaneous > Shell Extensions
      • Hide Windows & third-party items on file context menus (Shift overrides)

We'll call this the Hide... option in the rest of the guide.


Access hidden menus again

As the Hide... option's name suggests, you can hold Shift when right-clicking to show everything again.

A handful of context menus change function when Shift is down, which can make the next option better sometimes.


Move everything to a sub-menu

When the Hide... option is on, you can move all the hidden items into a sub-menu for easier access:

Then click New, set the following, and click OK:

Then click New again, set the following, and click OK:

  • Type = Run an Opus function
  • Action = Whatever you want. This name is only be visible when editing the menu.
  • Main command field:
    FileType CONTEXTMENU CONTEXTOPTIONS=windowsonly
    

Drag the sub-menu to reposition it.

If you place the sub-menu above other items, the items below will initially be inside the sub-menu. To fix that, right-click the first item after the menu and choose Decrease Indent:


Restoring individual items

If the Hide... option is on, and you want to hide most things but have a few exceptions, you can do that. This can be a bit of extra work, so using the above options is better unless it's a menu you use a lot.

You'd do this by editing Context Menus under Settings > File Types, similar to above. Which file type(s) or file type group(s) you add things to is up to you.

Restoring individual items - Simple

In some cases, it's easiest to add a menu item that runs the program directly. If you just want to open a file in another program, most (but not all) programs will work with this:

  • Type = Run an Opus function
  • Action = Name of program (or whatever you want).
  • Icon = Usually the program's exe file.
  • Main command field (change path as appropriate):
    "C:\Program Files\Tool\Tool.exe" {filepath$}
    

In more complex cases, you may need to look up the other program's command line arguments, if it has any.

Restoring individual items - Complex

In even more complex cases, you can tell Opus to un-hide a particular handler using a command like this (in a Context Menu, similar to the commands above):

FileType CONTEXTFORCE CONTEXTMENU={30351349-7B7D-4FCC-81B4-1E394CA267EB}

The big number in brackets is called a CLSID, and is different for each context menu handler.

If you're familiar with the Registry, and the application isn't UWP (or otherwise cursed by the Microsoft Store), you can often find its CLSID using RegEdit:

Another option is to turn on Context Menu debugging in Opus, and cause the menu item to appear. The logging will tell you the CLSID of each item added to the menu. For details, see the Context Menu Issues FAQ, and scroll down to Finding The Culprit.

That debugging also works with Microsoft Store apps (which aren't in the registry), but instead of a CLSID you'll get a name string which can be used in the same way.


Miscellaneous

  • If you just want to hide one item or one program's items, it's always best to check if the program itself has an option to turn them off.

  • Not all context menu items come from shell extensions, which is what everything above deals with. Some are simple commands in the registry. You can often see and edit those in the Context Menu editor.

  • In some cases, you might need to resort to editing the registry to remove a command. Details will depend on how the menu item is being added. Unfortunately, Windows has a multitude of overlapping mechanisms for doing this, so a detailed guide would go for pages. Ask in the Help & Support area if you need help with menus added by a particular program.


Ye Olde Tutorial

The original version of this is one of the oldest (and longest in need of a re-write :slight_smile: ) tutorials for Directory Opus on Windows, dating back to 2003. It's preserved here for posterity.


5 Likes

I´m not sure, if to ask here, but how can i force particular entries to the top? Actually i´d like even to get rid
of those four entries, since they are mostly redundant. For example »open« is done by pressing enter, i have no printer,
& the other two can be done by other means.

Those top items are probably filetype verbs, which Opus's filetype editor shows on the Actions tab. They always appear at the top of the context menu.

While you can delete them it's not a good idea as you'll break anything which depends on them. The Open verb in particular should never be deleted because that is usually what gets run when the file is double-clicked (etc.).

Ok, so i better leave them there. I´ve rearranged the menu, so now the Blowfish menu is at the bottom, which is also quite fast to access. I also found a nice trick, how to clean up some entries when showing the »full« context menu (pressing shift). It looks like Shellmenu & ShellExView from Nirtools can only hide stuff in the Explorer (like several Rar/7-Zip/etc entries), that still remains viewed in Opus´ context menu.

But simply adding two dashes before the CLSID, like »--{B41DB860-8EE4-11D2-9906-E49FADC173CA}« does the job. Maybe i overlooked some regular way to tweak this, but this also works quite well.

Yeah, on Vista and above the Nirtools add a "blocked" registry value which Opus 9 doesn't know about. Opus 10 will see it.

That's usually fine, and is similar to what Nirtools does on XP and below (it renames the InProcServer value instead, from what I remember). It's vaguely possible that it will take out more than just the shell extension, though, if the same COM object (represented by the CLSID) implements more than just a shell extension.

A better way to block a shell extension by CLSID is to add it to Opus's blacklist: Go to Preferences - Miscellaneous - Advanced and double-click the ignore_context_menus setting. A small window will appear into which you should paste the CLSID values, including curly braces, of the extension(s) you want to exclude, one CLSID per line.

Yeah, cool, thanks. I removed the dashes, making those four hidden entries visible again, & pasted the CLSIDs to that place. I knew i saw it somewhere. This way it´s easier to reactivate them again & maybe less riskier.

Hello,

Can I put my question down here?

I have arranged my Opus context menu according to my taste. Using the Go FOLDERCONTENT command, I manage to include the Start Menu folder, having its contents revealed.

Now I would like to set its display order so that the files appear preceding the folders. At the moment, what is happening is vice versa.
Is there an argument for this purpose?

Thanks,

You could just add another Go FOLDERCONTENT like so:

Go /desktop FOLDERCONTENT=nodirs
Go /desktop FOLDERCONTENT=nofiles

Don't put them together but separate "actions" in the context menu. but the same sub menu.

The order you put them in will be the order they get displayed.

Reading the Internal Command documentation, the Set command has a way to do so.

Set SORTORDER=files

Can this command be used in conjunction with the Go FOLDERCONTENT command?

Next questions,

  • Can the context menu be colorized? To become pink, for instance?

  • I found JRiver Media Center's GUID number within the registry and incorporated it to Opus context menu through:

    FileType CONTEXTFORCE CONTEXTMENU={GUID}
    

    Its native Windows Explorer context menu does not provide the JRiver icon, hence I add it onto Opus context menu. But it is fruitless. Neither Opus context menu displays icon. Is this a kind of context menu command which falls into "come from the system but aren't provided as "static verbs" in the registry" category?

No...

To some extent - though perhaps not entirely what you're looking for (I think the overall background color of the context menu may be system-controlled?)...

It's similar to how you've guessed... when you invoke a shell extension through that command, Opus relies on the extension to provide the icon. I believe several of us have asked if it would be possible for Opus to override whatever the extension is supplying - for the case where you want the context menu extension but don't like the icon - or like seems to be your case when the extension seems not to provide an icon at all. Chime in on the Support forum if you'd like to ask GPsoft to comment on making such a change...

Oh... for the colorizing options, check Preferences->Toolbars->Appearance. Have a go at the settings there under the "Use Office 2003-style for toolbars" option and see that you think. These color settings affect BOTH toolbars and context menus. If there's another place in Opus to affect the context menu colors - I don't know it off top of my head.

After reading the internal command documentation repeatedly and playing around with it for weeks, I realize that this is true.

I guess so. I have tried the Office 2003-style toolbar as you recommend me but that too only goes as far as to customize the highlight and gradient colors of the context menu, not the background color which unfortunately, is what I was looking for. :neutral_face:

Luckily, JRiver provides static verbs for each of its shell extension items. I switched to ContextMenu VERB command and it worked. The desired icon could be loaded for each action I specified. :thumbsup:

You can set the toolbar background colour or background image in the Customize dialog. If you need more help please start a new thread in Help & Support as it's off-topic here.

The custom-context-menu does not work for me. Is this How-to up-to-date?

Yes, it still works for me and lots of other people.

OK, I found the "Actions tab" now. under specific file type extensions.

... but I didn 't find "Directory Opus Archives" there. So, AFAICT, the filetype actions will always be first on the context menu. Then, somehow, the category that "Directory Opus Archives" is in comes next. The rest of the context menu is what a DOpus user has control of. Is that pretty much it?

Preferences / Zip & Other Archives / Archive Context Menu.

OK. Turning off the Windows context menu items and the archive context menu item cleaned up the messy full context menus nicely and adequately. While I've made an "Open With >" submenu with one entry, I am not going to bother adding more items to it and using it at this juncture, as it seems like too much work for too little gain. Is there a way to get the Windows "Open With >" menu item on the context menu without all the other menu items?

OK. Turning off the Windows context menu items and the archive context menu item cleaned up the messy full context menus nicely and adequately. While I've made an "Open With >" submenu with one entry, I am not going to bother adding more items to it and using it at this juncture, as it seems like too much work for too little gain. Is there a way to get the Windows "Open With >" menu item on the context menu without all the other menu items?[/quote]

Nevermind! I found it! (The "Open With" ContextMenuHandler from the registry).

You can also use FileType OPENWITHMENU