Skip to content

Support Store apps for Edit-capabilities #12802

Closed

Description

@AliveDevil

SHAssocEnumHandlers1 can be used to directly invoke a handler, and doesn't rely on registry hacks to find OpenWithList and shell/open/command to be defined.

Footnotes

  1. https://stackoverflow.com/questions/48400038/use-shassocenumhandlers-in-c-sharp ↩

Activity

  1. added this to the 9.0 milestone on Jan 20, 2022
  2. self-assigned this
    on Jan 20, 2022
  3. dkocher commented on Jan 20, 2022

    @dkocher
    Contributor

    Might also help to resolve #11770.

  4. AliveDevil commented on Jan 20, 2022

    @AliveDevil
    ContributorAuthor

    Might also help to resolve #11770.

    This would make all implementations for finding applications currently in place in Cyberduck Windows obsolete, as I'd like to just create one implementation which is capable of opening a file with any application, through Windows Shell.

  5. AliveDevil commented on Mar 29, 2022

    @AliveDevil
    ContributorAuthor

    Discussion here:
    This will result in preferences having to remove the Default-editor setting, as everything will be handled by underlying User preference in Windows.

    New behavior for editing files:

    • If none is returned in SHAssocEnumHandlers use SHOpenWithDialog1.
    • If any is returned, use isRecommended property to determine first and Edit toolbar option default application
      • Any other is appended by IEnumAssocHandler2 order
      • Append last item "Open With …" which uses SHOpenWithDialog.

    Unsure how to fit this into EditorFactory and ApplicationFinder though.
    Need to extend Application class to allow for passing IAssocHandler down the line and invoked with a file path.
    Cannot use ApplicationLauncher or ApplicationFinder as provided by AbstractEditor as that relies on Process.Start, which is unavailable here.

    Footnotes

    1. https://docs.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shopenwithdialog ↩

    2. https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nn-shobjidl_core-ienumassochandlers ↩

  6. AliveDevil commented on Mar 29, 2022

    @AliveDevil
    ContributorAuthor

    CLI behavior changes to following:
    --edit downloads file and opens default/recommended handler. If non available use SHOpenWithDialog
    Adding --edit=with or --edit-with always uses SHOpenWithDialog. Opinions here?

  7. AliveDevil commented on Mar 29, 2022

    @AliveDevil
    ContributorAuthor

    Currently blocked by microsoft/win32metadata#918.

  8. AliveDevil commented on Mar 30, 2022

    @AliveDevil
    ContributorAuthor

    Behavior will need to address for situations where there is no editor defined for a file type, i.e.:
    For .mp4 there is no editor defined on my system, but an application which is set as default viewer.
    Do we want to allow fast editing (Ctrl+K) for files with no registered application capable of editing a file type?

    SHAssocEnumHandlers will return any application with registered open verb of file type, not necessarily only handlers which are edit capable. There is no way of determining whether IAssocHandler can edit a particular file.

  9. AliveDevil commented on Mar 30, 2022

    @AliveDevil
    ContributorAuthor

    ProgIdApplication app = new(defaultQuery.ToString(), friendlyAppName, defaultIcon);

    We can ShellExecuteEx any arbitrary ProgId with specified verbs. This will need PInvoke, as ProcessStartInfo/Process.Start cannot use lpClass-field for starting a ProgId.
    Need to differentiate in ApplicationLauncher between ProgIdApplication and ShellApplication, which use different ways of invoking (IAssocHandler.Invoke/ShellExecuteEx).

  10. AliveDevil commented on Mar 31, 2022

    @AliveDevil
    ContributorAuthor

    It's something.

    2022-03-31.12-47-06.mp4
  11. added a commit that references this issue on Apr 27, 2022
  12. linked a pull request that will close this issueEdit capability for Store-apps #13030on May 4, 2022
  13. added a commit that references this issue on May 4, 2022
  14. modified the milestones: 9.0, 8.4.0 on May 5, 2022
  15. added theissue type on Aug 30, 2025
  16. changed the issue type fromtoon Aug 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions