Coder Social home page Coder Social logo

Comments (9)

Traubenfuchs avatar Traubenfuchs commented on September 28, 2024

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.

dwmkerr avatar dwmkerr commented on September 28, 2024

Thank @Traubenfuchs I'll look into this

from sharpshell.

mestefy avatar mestefy commented on September 28, 2024

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.

tolgaevcimen avatar tolgaevcimen commented on September 28, 2024

Are there any improvements or workarounds found for this issue? Or are you guys planning for a solution on this problem?

from sharpshell.

dwmkerr avatar dwmkerr commented on September 28, 2024

All,

A full reproduction of the issue is:

  1. Checkout branch d/ContextMenusForShortcuts.
  2. Build in debug mode and run.
  3. Register the 'DebugContextMenu' extension from the samples.
  4. Open the explorer window from the Server Manager.
  5. Navigate to the sharpshell\Tests\TestData\ContextMenus\Shortcuts folder.
  6. Select both files.
  7. Right click on the first file (not a shortcut) and see expected results (attached):
    image
  8. Do the same but right click on the second file (a shortcut) and an exception is thrown:
    image

I'm looking into the fix now, but looking at:

http://microsoft.public.platformsdk.shell.narkive.com/K3aVjyHw/icontextmenu-with-a-shortcut-and-another-file-folder-selected

I wonder if there may be issues in the shell itself. Updates will follow.

from sharpshell.

dwmkerr avatar dwmkerr commented on September 28, 2024

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.

falahati avatar falahati commented on September 28, 2024

Hey, thanks for the framework,
This fix is still not in the nuget package, is it?

from sharpshell.

dwielosz avatar dwielosz commented on September 28, 2024

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.

dwmkerr avatar dwmkerr commented on September 28, 2024

Closing this issue now, please re-open if needed.

from sharpshell.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.