-
-
Notifications
You must be signed in to change notification settings - Fork 240
Support context menu modifications for third-party file managers (XYplorer, Total Commander, Double Commander and possibly more)#797
Conversation
...info in third party file managers
...nd selected items
...ird-party file managers
THreeSH98
commented
Mar 6, 2026
You did a good job. I don’t understand anything about coding, but I would like Nilesoft Shell to work everywhere it’s possible. I use Everything and Directory Opus, and it’s a pity that this can’t be done in DOpus. If possible, could you please explain in simpler terms which lines of code need to be added to the .nss files to enable support in Everything? Thank you for your contribution!
N1ck01
commented
Mar 15, 2026
I was going to create a new thread asking about this but it sounds like the third-party file manager that I use, xplorer2, can also be included here as well, because only changes to theme.nss are working and no modify.nss/remove.nss changes are working.
The xplorer2 file manager appears to just use the standard Windows context menu, even though it adds some additional dedicated items to the top of the menu that are only shown within xplorer2 but not within Windows File Explorer, but those additional items can be removed within the advanced options of xplorer2 but even then no modify.nss/remove.nss changes work.
So I'm really hoping that whatever these proposed changes are will also be able to support the xplorer2 file manager or if it can also be checked for compatibility with this implementation.
Thank you very much for trying to support third-party file managers.
webtechlabs
commented
May 17, 2026
Very nice contribution. Hopefully @moudey will add your PR in the next build. Happy to see Shell work with any other app that uses the OS built-in context menu. Thank you for your fix.
RubicBG
commented
May 20, 2026
NS source code here - in this GitHub Repo, is several builds behind. Some function are missing
app.delete
app.exists
app.get
app.remove
app.set
package.logo
path.dir.boxl
path.file.save_box
str.fmt
user.groups
sys.lang.id
sys.lang.name
sys.lang.country
sys.lang
appx.apps
appx.entryPoint
appx.executable
appx.logo
package.apps
package.entryPoint
package.executable
ump.apps
ump.entryPoint
ump.executable
ump.logo
... and more
I restored most of them, fixed a few others, and also added 3rd party app support (not the method described here, but without this idea I wouldn't have succeeded - many thanks for sharing the solution). I want to fix a few more things before sharing the finished dll file - when I'm ready I'll share it here too.
RubicBG
commented
May 27, 2026
https://github.com/RubicBG/ReShell-Releases/blob/main/shell.dll
A few things have changed from the original:
sel.typereturns different numbers (new numbering: file=1, dir=2, namespace=3...)sys.is_primary_monitorhas been renamed tosys.screen.primary
All changes, fixes and new functions will be documented soon at:
https://rubicbg.github.io/ReShell-Releases/
Uh oh!
There was an error while loading. Please reload this page.
I implemented an context menu shell extension in Nilesoft Shell to retrieve the selected file list, so that it works in most file managers where Shell Extensions are allowed to run in context menu. In my test, in XYplorer, Total Commander, Double Commander, Everything context menu modifications are working correctly, in Directory Opus and OneCommander, they are not working because they don't use native context menu.
In the beginning I discovered that Nilesoft Shell doesn't work properly with third-party file managers. It only changes the menu appearence, item addition/modification are not working, like so:
Clipboard-20260216-02
On the Internet I found out lots of discussions on this problem:
https://www.xyplorer.com/xyfc/viewtopic.php?p=226677#p226677
https://www.xyplorer.com/xyfc/viewtopic.php?t=26686
https://web.archive.org/web/20250715220407/https://www.xyplorer.com/xyfc/viewtopic.php?t=27737
https://resource.dopus.com/t/how-can-i-make-the-directory-opus-use-my-windows-context-menu/53508/4
https://www.reddit.com/r/OneCommander/comments/1hf7q6l/request_support_for_nilesoft_shell_integration/
Because I feel like Nilesoft Shell fits well with modern Windows 11 UI, and replacement solutions are not as easy to use, I decided to somehow implement third-party file manager support for Nilesoft Shell. I reseached into the code of Nilesoft Shell and come up with my solution.
The details of this implementation is that:
Selection::QuerySelected.g_ShellContext.ContextMenu::Initializeit checks for the dummy context menu item it generated to judge whether a menu is indeed a context menu.QuerySelectedreads selected file list stored ing_ShellContext.Instead of Windows File Explorer hook that only works in Explorer, this method can retrieve the selected file list wherever Shell Extension runs (in third-party file managers). The original implementation requires a
ShellBrowserto be available inSelection::QueryShellWindow, and used inSelection::QuerySelected, but third-party managers implement file browser by themselves, they don't have aShellBrowserexposed. My implementation doesn't completely change how it works, it only tries to use the Shell Extension retrieved file selection list when the original method fails.Below are some screenshots showing it work in different file managers. In
shell.nssthe excluded condition should be changed. like:XYplorer
Clipboard-20260216-01 Clipboard-20260216exclude.where = !process.is_explorer && (process.name != "XYplorer") && (process.name != "notepad") && (process.name != "dopus") && (process.name != "dopusrt") && (process.name != "doublecmd") && (process.name != "OneCommander")Total Commander 64-bit
Screenshot_20260216-015308
Double Commander
Screenshot_20260216-015342_doublecmd
Directory Opus (not working)
Screenshot_20260216-014944_dopusEverything (working)
Screenshot_20260216-025936_thorium
If it's not working, it can be added in "excluded" condition, to remove the "ShellExtSelectionRetriever Placeholder" item in context menu.