Comments (9)
I just wanted to comment that this problem still persists in V2.2: The new entry is visible in the contextmenu when right clicking a shortcut, but the Click event is not executed... My workaround to interacting with shortcuts is adding something to the send to menu.
from sharpshell.
Thank @Traubenfuchs I'll look into this
from sharpshell.
Hi there. After fiddling with the code it seems that the problem lies with SelectedItemPaths from ShellExtInitServer. When selecting multiple files, including a shortcut (.lnk file) and right clicking the shortcut file, SelectedItemPaths will contain ONLY the path referenced by the shortcut (e.g if you have a Foo.lnk on desktop and will reference c:\program files\Foo\Foo.exe the path retrieved will be c:\program files ...\Foo.exe). However, if any of the other files will be right clicked, SelectedItemPaths will have all the files including the shortcut (.lnk) file.
from sharpshell.
Are there any improvements or workarounds found for this issue? Or are you guys planning for a solution on this problem?
from sharpshell.
All,
A full reproduction of the issue is:
- Checkout branch
d/ContextMenusForShortcuts
. - Build in debug mode and run.
- Register the 'DebugContextMenu' extension from the samples.
- Open the explorer window from the Server Manager.
- Navigate to the
sharpshell\Tests\TestData\ContextMenus\Shortcuts
folder. - Select both files.
- Right click on the first file (not a shortcut) and see expected results (attached):
- Do the same but right click on the second file (a shortcut) and an exception is thrown:
I'm looking into the fix now, but looking at:
I wonder if there may be issues in the shell itself. Updates will follow.
from sharpshell.
Hi All,
b6a0440 fixes the first issue (the exception) which gets us somewhere. However there is a separate issue which is more complex. Select two files, one a shortcut and one a normal file. Right click on the normal file and everything works as expected. Right click on the shortcut and you will only get the shortcut target in the selected item paths. This is the issue mentioned above.
However, for those who desperately need the exception resolved, the fix above works. Check it out and build manually if you need it urgently, otherwise I'll be releasing once I fix the related issue.
from sharpshell.
Hey, thanks for the framework,
This fix is still not in the nuget package, is it?
from sharpshell.
Hi, I'd like to refresh this issue a little. The problem actually is in the list provided by WinApi in IShellExtInit::Initialize method. There are workaround described at StackOverflow and other forums.
Although this is not the best solution it may be good enough fix if controlled by some kind of option/switch. Important thing is to register context menu in a proper way. I couldn't find description of "*" and "AllFilesystemObjects" groups but it seems Windows treats it differently.
from sharpshell.
Closing this issue now, please re-open if needed.
from sharpshell.
Related Issues (20)
- Creating folder in Windows Explorer like DropBox or OneDrive, Box etc
- Possible to hide items in existing shell context menu
- Nuget package is not updated since 3 years.
- doesnt work with windows 11 22624 HOT 7
- Feature: Custom archive file browsing within Explorer
- SRM gives weird results HOT 3
- Click handler is never invoked in shell context menu
- ServerRegistrationManager class not mentioned in docs/tutorials? HOT 2
- How to add Context Menu in Window 11?
- Question: How to get DesktopView to access and move desktop icons
- DeskBand is not working on Win 11 HOT 3
- Implentation of a custom option in the windows 11 root context menu
- Preview handler steals focus from Explorer window HOT 5
- ContextMenu crash when the second-level menu have icon
- Shell extension menu item doesn't appear in Win11/Win10 HOT 1
- (64bit assembley) File " " is not a sharpshell server.
- Adding custom icons to files on desktop crashes explorer.exe
- Question
- Sharpshell not working on win11
- ContextMenu Order
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sharpshell.