Skip to content

While in SSH, running WinGet raises the ResourceUnavailable error. #513

Closed

Description

Brief description of your issue

While in Windows 10 Pro using SSH, running WinGet raises an error stating that the file cannot be accessed by the system. Otherwise (without SSH), the command runs just fine.

Steps to reproduce

  1. Start an SSH using an administrator's credentials
  2. Run WinGet

Expected behavior

Should be execute and be accessible by the system as we usually would without using SSH.

Actual behavior

ResourceUnavailable: Program 'winget.exe' failed to run: The file cannot be accessed by the system.

Environment

[winget --info]
Windows Package Manager v0.1.41821 Preview
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.19041.388
Package: Microsoft.DesktopAppInstaller v1.0.41821.0

Any other software?

Activity

  1. ghost added
    Needs-Triage
    on Jul 26, 2020
  2. belveruski commented on Jul 27, 2020

    @belveruski

    Same problem.

    Windows 10 Pro, 2004 Build 19041
    OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5

  3. added
    Issue-Bug
    and removed
    Needs-Triage
    on Jul 27, 2020
  4. added this to the milestone on Jul 27, 2020
  5. bbqsrc commented on Jan 4, 2021

    @bbqsrc

    This is still happening.

  6. JohnMcPMS commented on Jan 7, 2021

    @JohnMcPMS
    Member

    I suspect that this is due to the App Execution Alias that is used to expose winget.exe from a UWP package. I don't know though if the issue is that SSH is doing something beyond CreateProcess and is not happy with the stub file, or if you are trying to SSH into another session/machine/user that does not have the package registered.

    Generally the resolution to this falls into the category of requesting a different distribution mechanism, ie an unpackaged exe or msi to install the package manager from.

  7. bbqsrc commented on Jan 7, 2021

    @bbqsrc

    The user I ssh into is the user that installed winget in the first place. 😄

    I am happy with any installation mechanism, so the moment that is possible, let me know and I can test if it resolves this issue.

  8. peter-dolkens commented on Mar 24, 2021

    @peter-dolkens

    I believe this is actually an issue in OpenSSH:

    PowerShell/Win32-OpenSSH#1632

  9. denelon commented on Mar 24, 2021

    @denelon
    Collaborator

    I'll keep this Issue open so we can track the PowerShell Issue to see if that resolves this problem.

  10. added
    Area-External
    on May 6, 2021
  11. chrisbrasington commented on Jun 4, 2021

    @chrisbrasington

    Muhammad Asif Mohtesham (@asifmohtesham) Demitrius Nelon (@denelon)

    all SSH logins are connected into windows against NT AUTHORITY\Network .
    running store apps (in this case winget) requires connecting into windows againt NT AUTHORITY\Interactive aka GUI and hence they can not be run from SSH logins aka NT AUTHORITY\Network.

    AFAIK, this is by design behavior and can only be changed if winget team separates winget from appInstaller or from store.

    Thanks for the explanation. Unfortunately the main reason I installed winget was to be able to run it remotely.

  12. petervk commented on Jun 21, 2021

    @petervk

    Is there any way to get this to work? I would love to be able to SSH into my other windows machines to run winget to update them.

  13. Masamune3210 commented on Jul 13, 2021

    @Masamune3210

    Im not sure what you are trying to accomplish complaining about MSIX here....

  14. denelon commented on Sep 23, 2021

    @denelon
    Collaborator

    I believe this issue is fully external, and there is a bug tracking this at PowerShell/Win32-OpenSSH#1632 be sure to add your 👍 to help raise priority.

  15. modified the milestones: , v1.2 Client, v1.1-Client on Oct 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-ExternalIssue-Bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions