shell-x icon indicating copy to clipboard operation
shell-x copied to clipboard

Stopped working some time ago.

Open mshakurov opened this issue 1 year ago • 5 comments

No errors during registration, unregistration, full reinstallation. But the menu is not displayed at all. Has something changed after Windows 10 updates? Or did I do something special in the Windows 10 settings (I didn't do anything special)? How can you find the cause?

mshakurov avatar Apr 07 '25 13:04 mshakurov

In testing mode everything is fine, it works. But in testing mode you directly execute methods from the SharpShell.dll assembly. But from within Explorer the server calls the methods. I even added logging in the CanShowMenu and CreateMenu methods of the DynamicContextMenuExtension class. Nothing is written to the log file. It seems that the server does not call methods at all, while in testing mode everything is written to the log file perfectly. I create the log file in the settings folder, to which the server must have write access.

mshakurov avatar Apr 07 '25 14:04 mshakurov

Hm.. Strange.

I am using uo-to-date Win11, and it works OK:

Image

It looks like the SharpShell OS integration is broken somehow. Though small chance. You may try to check if the exe (or/and DLL) is locked by the OS. Right-click properties, look for the "Unlock" button.

Antivirus is the another suspect.

You can also try to see if the handlers folder structure is causing any problems. If indeed it is the case, then you may want to reset the folder:

  • sudo shell-x.exe -open and backup your folders
  • sudo shell-x.exe -init This will reset the handlers folder structure, and you should be able to see the default config menu item:

Image

oleg-shilo avatar Apr 13 '25 13:04 oleg-shilo

Oh, sorry, SharpShell was to blame. Another, not the first, PC reboot helped. This is very strange. What is surprising is that before several PC reboots, unregistering and then registering this extension did not change the behavior of the context menu. Now even logging to a file works (not in debugging) for all the necessary events. Tank you.

mshakurov avatar Apr 14 '25 12:04 mshakurov

Oh no. Again. Now it became clear that the SharpShell server often stops working until reboot. It is not possible to activate it. Maybe there is a way to revive it without rebooting?

mshakurov avatar Apr 28 '25 10:04 mshakurov

Most likely, SharpShell is started by the explorer. So restarting the explorer will is likely to restart the SharpShell server.

  1. Using Task Manager (simple)
    Press Ctrl + Shift + Esc → Task Manager opens. Find Windows Explorer in the list. Right-click → Restart.
  2. Powershell Stop-Process -Name explorer -Force; Start-Process explorer

oleg-shilo avatar Apr 28 '25 12:04 oleg-shilo