Skip to content

'Winget' command does not work #995

Closed

Description

@djhalnon

I've installed the App Installer package from the Microsoft Store, however, curiously, I can't run winget. When I do, I get: "'winget' is not recognized as an internal or external command, operable program or batch file."

Now, I've seen a lot of stuff about paths. Also curiously, though, "%USERPROFILE%\AppData\Local\Microsoft\WindowsApps" is already in my PATH.

And also curiously, I've searched the entire drive for any file beginning with "winget", and came up with nothing whatsoever.

I have a feeling this thing never installed, even though it says it did and even though it shows in the Store app as "This product is installed."

Any solution? Or is this true "beta-ware" that really sometimes just doesn't work, and I should just forget about it?

Activity

  1. ghost added
    Needs-Triage
    on May 26, 2021
  2. denelon commented on May 27, 2021

    @denelon
    Collaborator

    djhalnon If you are not on a Windows Insider build or part of the Windows Package Manager Insider group, it is likely you received the version of the App Installer that does not include the winget client.

    https://github.com/microsoft/winget-cli#installing-the-client

    You can download and double-click the installer from the https://github.com/microsoft/winget-cli/releases page.

    Any newer version of the App Installer published to the store will automatically be updated on your system (assuming no Group Policy is blocking the store).

  3. added
    Issue-Bug
    and removed
    Needs-Triage
    on May 27, 2021
  4. arnitdo commented on May 27, 2021

    @arnitdo

    Facing a similar problem here. Installed it from the releases page. Searching the C:\ Drive for 'winget' returns no search results apart from Microsoft Store Search cache files. No application exists in WindowsApps\ as well.

    Out of curiosity, what does the AppInstallerCLI.exe executable do? Is that supposed to be winget?

  5. mnpenner commented on May 27, 2021

    @mnpenner

    FWIW, I didn't get winget either when I went to the store page. Said I already had App Installer. But the "directly install" link from the blog post seemed to force an update, and now I have it.

  6. denelon commented on May 27, 2021

    @denelon
    Collaborator

    Out of curiosity, what does the AppInstallerCLI.exe executable do? Is that supposed to be winget?

    That is the name for the Windows Package Manager client .exe as compiled/built. We use and App Execution Alias to map winget.exe to AppInstallerCLI.exe.

  7. JoeLyga commented on May 27, 2021

    @JoeLyga

    Facing the same issue. Running winget produces no output in powershell.

  8. denelon commented on May 27, 2021

    @denelon
    Collaborator

    Joe Lyga (@JoeLyga) are you a Windows Package Manager Insider or running a Windows Insider build?
    How did you install the "App Installer"?

  9. added this to the milestone on May 27, 2021
  10. billriess commented on Jun 1, 2021

    @billriess

    I'm also having the no output issue.

  11. impossiblynew commented on Jun 1, 2021

    @impossiblynew

    This seems to be the same issue as #502 (I'm also having this issue)

  12. denelon commented on Jun 1, 2021

    @denelon
    Collaborator

    The Windows Package Manager is distributed with the "App Installer". Make sure you have the correct version that includes the Windows Package Manager. In PowerShell:

    PS C:\Users\denelon> Get-AppxPackage microsoft.DesktopAppInstaller
    
    
    Name              : Microsoft.DesktopAppInstaller
    Publisher         : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
    Architecture      : X64
    ResourceId        :
    Version           : 1.11.11451.0
    PackageFullName   : Microsoft.DesktopAppInstaller_1.11.11451.0_x64__8wekyb3d8bbwe
    InstallLocation   : C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_1.11.11451.0_x64__8wekyb3d8bbwe
    IsFramework       : False
    PackageFamilyName : Microsoft.DesktopAppInstaller_8wekyb3d8bbwe
    PublisherId       : 8wekyb3d8bbwe
    IsResourcePackage : False
    IsBundle          : False
    IsDevelopmentMode : False
    NonRemovable      : False
    Dependencies      : {Microsoft.VCLibs.140.00.UWPDesktop_14.0.29231.0_x64__8wekyb3d8bbwe,
                        Microsoft.DesktopAppInstaller_1.11.11451.0_neutral_split.scale-100_8wekyb3d8bbwe}
    IsPartiallyStaged : False
    SignatureKind     : Store
    Status            : Ok
    

    Check to see that the version is greater than 1.11

    If you do have the current version of the AppInstaller, the other areas to check are App Execution Alias settings as well as other troubleshooting steps in #502

  13. added
    Needs-Author-Feedback
    on Jun 1, 2021
  14. billriess commented on Jun 2, 2021

    @billriess

    I can confirm that the App Execution Alias is enabled and the Get-AppxPackage microsoft.DesktopAppInstaller gives the following results:

    Name              : Microsoft.DesktopAppInstaller
    Publisher         : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
    Architecture      : X64
    ResourceId        :
    Version           : 1.11.11451.0
    PackageFullName   : Microsoft.DesktopAppInstaller_1.11.11451.0_x64__8wekyb3d8bbwe
    InstallLocation   : C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_1.11.11451.0_x64__8wekyb3d8bbwe
    IsFramework       : False
    PackageFamilyName : Microsoft.DesktopAppInstaller_8wekyb3d8bbwe
    PublisherId       : 8wekyb3d8bbwe
    IsResourcePackage : False
    IsBundle          : False
    IsDevelopmentMode : False
    NonRemovable      : False
    Dependencies      : {Microsoft.VCLibs.140.00.UWPDesktop_14.0.29231.0_x64__8wekyb3d8bbwe,
                        Microsoft.DesktopAppInstaller_1.11.11451.0_neutral_split.scale-125_8wekyb3d8bbwe,
                        Microsoft.DesktopAppInstaller_1.11.11451.0_neutral_split.scale-100_8wekyb3d8bbwe,
                        Microsoft.DesktopAppInstaller_1.11.11451.0_neutral_split.scale-400_8wekyb3d8bbwe}
    IsPartiallyStaged : False
    SignatureKind     : Store
    Status            : Ok
    

    Running winget just gives no output. Curiously, the winget.exe is 0 bytes in the WindowsApps folder.

  15. 55 remaining items

  16. ubeydtalha commented on Jul 4, 2023

    @ubeydtalha

    go C:\Users"[YOUR_USERNAME]"\AppData\Local\Microsoft\WindowsApps

    you will find winget there

    image image
  17. emoxam commented on Aug 7, 2023

    @emoxam

    Joe Lyga (@JoeLyga) are you a Windows Package Manager Insider or running a Windows Insider build? How did you install the "App Installer"?

    I was at Windows Package Manager Insider, how can i check it ?
    It stoped to work a few days ago. Why ?

  18. xodotLBO commented on Aug 17, 2023

    @xodotLBO

    After latest app installer update I can't get winget to work
    winget : The term 'winget' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
    the spelling of the name, or if a path was included, verify that the path is correct and try again.

    I tried re-registering it, editing env. variables, updating everything.. nothing helps.
    PS C:\WINDOWS\system32> Get-AppPackage -Name winget | Select Name, Version, Status

    Name Version Status


    Microsoft.Winget.Source 2023.622.905.772 Ok

  19. emoxam commented on Aug 17, 2023

    @emoxam

    It seems for some reason we need to add this manually to PATH
    %userprofile%\AppData\Local\Microsoft\WindowsApps\

  20. xodotLBO commented on Aug 17, 2023

    @xodotLBO

    Already did, it didn't do anything.

  21. emoxam commented on Aug 17, 2023

    @emoxam

    Already did, it didn't do anything.

    It helped me.
    I did this because of this

    dir %userprofile%\AppData\Local\Microsoft\WindowsApps\ | findstr winget
    16.08.2023 12:03 0 winget.exe

  22. xodotLBO commented on Aug 17, 2023

    @xodotLBO

    Well i wish it helped me but doesn't seem to be working as it gives me same error that term winget is not recognized

  23. emoxam commented on Aug 17, 2023

    @emoxam

    Well i wish it helped me but doesn't seem to be working as it gives me same error that term winget is not recognized

    cd %userprofile%\AppData\Local\Microsoft\WindowsApps
    winget

    works ?

    show me dir command output if it's not.

  24. xodotLBO commented on Aug 17, 2023

    @xodotLBO

    It doesn't work, says the path doesn't exist.
    Not sure why is it trying to path it thru c:windows
    cd : Cannot find path 'C:\WINDOWS\system32%userprofile%\AppData\Local\Microsoft\WindowsApps' because it does not exist.

    Edit: I fixed it by changing App execution aliases.. Can't believe that was the problem this entire time

  25. emoxam commented on Aug 17, 2023

    @emoxam

    cd %userprofile%\AppData\Local\Microsoft\WindowsApps

    It should not be powershell, it should be cmd console while you trying to cd.

    What do you mean? What "App execution alias" ?

  26. xodotLBO commented on Aug 17, 2023

    @xodotLBO

    cd %userprofile%\AppData\Local\Microsoft\WindowsApps

    It should not be powershell, it should be cmd console while you trying to cd.

    What do you mean? What "App execution alias" ?

    Works fine in cmd.
    App execution alias is exactly what it says, you can use search bar and see whats it like. I had winget com server, package manager and everything else disabled somehow even tho I didn't touch anything

  27. emoxam commented on Aug 17, 2023

    @emoxam

    cd %userprofile%\AppData\Local\Microsoft\WindowsApps

    It should not be powershell, it should be cmd console while you trying to cd.
    What do you mean? What "App execution alias" ?

    Works fine in cmd. App execution alias is exactly what it says, you can use search bar and see whats it like. I had winget com server, package manager and everything else disabled somehow even tho I didn't touch anything

    So you just enabled all that is about winget ? And that was the fix ?

  28. xodotLBO commented on Aug 17, 2023

    @xodotLBO

    Yea, I enabled everything related to it and now it works fine. I can post a picture if needed. But I never touched these settings, they disabled themselves after the update somehow

  29. emoxam commented on Aug 17, 2023

    @emoxam

    Yea, I enabled everything related to it and now it works fine. I can post a picture if needed. But I never touched these settings, they disabled themselves after the update somehow

    Can confirm it was disabled too at my colleague PC.

  30. ImAhmadAbdullah commented on Mar 21, 2024

    @ImAhmadAbdullah

    I did this to fix it: New-Alias -Name winget -Value "C:\Users\User\AppData\Local\Microsoft\WindowsApps\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\winget.exe"

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

    Issue-BugNeeds-Author-Feedback

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions