Repository navigation
Closed
Labels
Area-ExternalIssue outside of winget-cli sourceIssue-BugIt either shouldn't be doing this or needs an investigation.
Milestone
Description
Brief description of your issue
Typing winget on powershell or cmd just throws error.
Steps to reproduce
Nothing special, applied to Insider program and tried install new App Manager via microsoft store.
Expected behavior
Having winget app working
Actual behavior
Typing winget returns:
Program 'winget.exe' failed to run: The system cannot find the file specified
At line:1 char:1
+ winget
+ ~~~~~~.
In riga:1 car:1
+ winget
+ ~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException
+ FullyQualifiedErrorId : NativeCommandFailed
I then tried debugging it:
PS C:\Users\Admin>Trace-Command -Expression {winget} -Name CommandDiscovery -PSHost | out-null
DEBUG: CommandDiscovery Information: 0 : Looking up command: winget
... skipping all path discovery ...
DEBUG: CommandDiscovery Information: 0 : Command Found: path (C:\Users\Admin\AppData\Local\Microsoft\WindowsApps\winget.exe) is an application with name: winget.exe
DEBUG: CommandDiscovery Information: 0 : Looking up command: Set-StrictMode
DEBUG: CommandDiscovery Information: 0 : Cmdlet found: Set-StrictMode Microsoft.PowerShell.Commands.SetStrictModeCommand
DEBUG: CommandDiscovery Information: 0 : Looking up command: Set-StrictMode
DEBUG: CommandDiscovery Information: 0 : Cmdlet found: Set-StrictMode Microsoft.PowerShell.Commands.SetStrictModeCommand
DEBUG: CommandDiscovery Information: 0 : Looking up command: Set-StrictMode
DEBUG: CommandDiscovery Information: 0 : Cmdlet found: Set-StrictMode Microsoft.PowerShell.Commands.SetStrictModeCommand
DEBUG: CommandDiscovery Information: 0 : Looking up command: Set-StrictMode
DEBUG: CommandDiscovery Information: 0 : Cmdlet found: Set-StrictMode Microsoft.PowerShell.Commands.SetStrictModeCommand
Program 'winget.exe' failed to run: The system cannot find the file specified
At line:1 char:28
+ Trace-Command -Expression {winget} -Name CommandDiscovery -PSHost | o ...
+ ~~~~~~.
At line:1 char:28
+ Trace-Command -Expression {winget} -Name CommandDiscovery -PSHost | o ...
+ ~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException
+ FullyQualifiedErrorId : NativeCommandFailed
Environment
[winget --info]
Windows Package Manager version Can't run winget do I can't say it for sure
Windows: Windows.Desktop version 10.0.19042 N/D build 19042 (if this is the value needed)
Package: Microsoft.DesktopAppInstaller version - Windows Store doesn't state the version
Any other software? WSL and hyper-v enabled
Reacted by Adam Kauffman, Mahmut Arıkan, Hervé and Alexander Yumashev
Metadata
Metadata
Assignees
Labels
Area-ExternalIssue outside of winget-cli sourceIssue-BugIt either shouldn't be doing this or needs an investigation.
Type
Projects
- StatusShow more project fieldsDone
Activity
denelon commentedon Jan 25, 2021
There is some calendar time on our hands currently between requesting access to the Windows Package Manager insiders program and getting the update to the "App Installer" in the store. Is this still happening? Have you been able to get the update to the App Installer?
freeone3000 commentedon Feb 4, 2021
Hi, this is still happening to me. The installer from the github page says a new version is already installed, but I get exactly this error.
denelon commentedon Apr 27, 2021
Jasmine Moore (@freeone3000) have you checked to see if you have the App Execution Alias enabled for "winget"?
rbeesley commentedon May 31, 2021
Demitrius Nelon (@denelon), perhaps this is something you want to pull back into To Do?
This is a problem I'm seeing too. I'm on 20H2 and enabled this from joining the "Windows Package Manager Insider Program." I have the same failure trying to run winget from PowerShell and in a Command Prompt I get the following results:
Windows Package Manager Client (winget.exe) is listed as an App Execution Alias and it is enabled. The version of App Installer installed according to Microsoft Store is version 1.11.11451.0.
10 remaining items
denelon commentedon Oct 1, 2021
Raikoug (@raikoug)
We've published the v1.1 release candidate and updated our troubleshooting guide.
Can you confirm if this is still happening?
A9G-Data-Droid commentedon Oct 1, 2021
I'm getting the same error after installing the latest version from an administrative PowerShell session.
denelon commentedon Jun 21, 2022
https://github.com/microsoft/winget-cli/tree/master/doc/troubleshooting
vzabawski commentedon Nov 20, 2023
I had the same issue and I've noticed winget works under regular user, but doesn't work under Administrator. So, running regular Terminal helped me.
A9G-Data-Droid commentedon Nov 20, 2023
That's the crux: The goal of a package manager is to be able to run
winget upgrade --allas admin, to update all software on the computer system. If you run as a regular user you can't update all the software. If you run as admin, it just fails.You can't use winget to manage software in an enterprise. If you could combine this with InTune you could manage Windows systems in a similar fashion to Linux systems. Linux had package management figured out decades ago, and it's open source. All Microsoft had to do was read the source of aptitude