-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sometimes, winget doesn't work. #502
Comments
@lisaraj2009 can you run |
No, I seem to be unable to run any winget-related command at certain times. At the time of writing, I'm running the latest version of winget. I'm running Windows Terminal 1.0.1811.0. |
can you try this: Get-Command winget
# here is what I see:
Name : winget.exe
ModuleName :
Module : @{Name=}
CommandType : Application
Definition : C:\Users\tfl.COOKHAM\AppData\Local\Microsoft\WindowsApps\winget.exe
ParameterSets : {} |
This comment has been minimized.
This comment has been minimized.
The author of the post hasn't responded yet, but since I have ran into the same issue I'll put what I got from Get-Command winget:
I'm guessing the update got botched. I'll try uninstalling and reinstalling it. For reference, I am not in the Insider Program; OS build is 19041.388. |
When I try to install with the release appxbundle, it gives me the button to reinstall. When I click that, it tells me that winget is already at its latest version. Unless auto update for non-insiders is a thing now, Going through the reinstall doesn't change anything, and the Get-Command still says the version is 0.0.0.0 |
For uninstalling, the method of removing App Installer does remove winget but when reinstalling App Installer the broken winget seems to get reinstalled as well (my hunch being when user data is restored). |
I've gotten around the issue by signing up for the Test Flight. It seemed that I had originally installed it manually and some update along the way may have broken it. However, Get-Command winget will still state that the Version is 0.0.0.0 |
This comment has been minimized.
This comment has been minimized.
I'm running into the same "version 0.0.0.0" issue after installing winget 0.1.42101 Preview directly from the GitHub Releases page in Windows 10 version 10.0.19041.388.
Some additional output for reference: PowerShell output when run from an Admin window in the "Standard" account: Program 'winget.exe' failed to run: The file cannot be accessed by the systemAt line:1 char:1
+ winget
+ ~~~~~~.
At line:1 char:1
+ winget
+ ~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException
+ FullyQualifiedErrorId : NativeCommandFailed I ran into this issue while trying to verify #528. |
Don't mind the "0.0.0.0" version. PowerShell's I believe running |
This comment has been minimized.
This comment has been minimized.
Issue still persists and I've encounter this with the issue with previously working and newly install versions of Linux under wsl not being found, even immediately after install. I seem to run into these issues a lot. Apparently, Microsoft has deployed bot to close cases as inactive rather than actually fixing the code on their closed source OS. Some 30 years after Microsoft set the standard of releasing buggy software and fixing it later through updates, I guess this is Microsoft again setting the bar for the rest of industry by now declaring it does not ever need to fix those bugs. Anyway, marking this issue as relevant again as latest insider build has broken all functionality of wsl (which the CUDA support for wsl in an insider build was the whole reason for me to switch to an insider build). |
I need to clean up the messaging from the bot. When we put "Needs author feedback" we're looking for additional data. That's when the bot would close (assuming no response). I've opened this back up. |
We need to capture some of the scenarios where the App Execution Alias is disabled and results in this error. We can add some F.A.Q.s to help users troubleshoot this problem, and explicitly identify the different error messages a user might see when this is what is preventing the winget.exe command from functioning correctly. |
This happens to me too. I had just installed v1.0.11451 from github releases. Though it was likely broken before too. At first, the command wasn't recognized. So I added the WindowsApps directory to my user path: %userprofile%\AppData\Local\Microsoft\WindowsApps Even afterwards, the command wasn't recognized. If I navigate manually to %userprofile%\AppData\Local\Microsoft\WindowsApps and run .\winget, there is no output. If I run Get-Command on winget, it comes up as version 0.0.0.0. I've tried resetting and reinstalling a few times, but mine seems to be in a broken state.
|
@JoeLyga there is also an App Execution Alias to map the actual .exe to winget.exe. Do you have that enabled as well? |
I'm having the same issue (installed via GitHub releases), however, when attempting to do it via PS (with admin priv.) I get the following error
I also tried to cd into the directory where it is installed too and that did not work. If it helps, I have winget installed both on the admin and standard account. I have checked and the App Execution Alias on both accounts for winget is enabled. |
Not sure if I should be posting here or creating a new issue. Winget doesn't run anymore but in my case I can actually explain what lead to this situation. The error I get under CMD is:
And via PowerShell:
"Get-Command winget" reports:
I've run: Now I'll get into what caused this. A few days ago my Store was botched and failing to update most apps. I haven't a clue what caused this but there I was getting errors on many apps trying to update. Following some research on the internet, I found people suggesting changing the owner of the WindowsApp folder to my admin user and adding myself to the permissions so I could delete the app folder, purge any registry settings and so forth. This actually worked. You'd think I'd destroy my system but it actually worked. The apps updated and everything was fine. During this time I found out about Winget and ended up installing it too. Really cool to have a package manager for Windows. A few days after I remembered I had forgotten to restore the WindowsApp back to TrustedInstaller. So I did just that. I went to the security tab in properties and set it back to NT Service\TrustedInstaller. Problem was I received many "Permission Denied" errors when trying to change it back. Following some more research I came up with a neat program from SysInternals called "psexec.exe" that's capable of giving me SYSTEM-shell. Through that I ran:
And it seems to have worked. I started getting a bunch of errors for a multitude of apps though. Such as the Xbox app. Couldn't even open it. Some error about parameters. Sorry I forget what it was exactly. After reinstalling these apps, everything's fine again. With the exception of Winget. Like I said, reinstalling App Installer from the Microsoft Store doesn't solve the problem. |
@VidarPT try installing the App Installer from the 1.0.11451 release. Unless you are on a Windows Insider build or you are in the Windows Package Manager Insider program, you will get v1.10.x of the App Installer not containing the Windows Package Manager from the Microsoft Store. |
Installed this morning using the bundle from the GitHub page (v1.0.11451) and using Add-AppxPackage. Running into the same issue, but this is what I discovered. If I run PS as the account that I'm logged in as, WinGet works. This works for a non-admin AD account as well as an different AD with admin creds. Now if I escalate privileges for PS using the admin account while logged with the standard user, it doesn't work. All app store packages were fully updated at the time of testing. [Edit] For poops and giggles I tried it with ye old cmd terminal, got the same results as above. |
I also noticed the problem with other apps I had installed. But the command pointed above fixed it
But looks like something is still broken |
I get no output from winget, not in cmd or in powershell, as my regular user or as admin
as if I didn't enter anything at all. tried removing and manually installing latest appxbundle from github didn't change anything. |
@VidarPT I've managed to run into exactly the same issue. I've tried the same steps as you, uninstalling and reinstall AppInstaller, but still getting the same issue of:
Did you ever find a solution? |
@Bahnschrift take a look at https://github.com/microsoft/winget-cli/tree/master/doc/troubleshooting. If that doesn't resolve the issue you are having, please file a new bug. |
Try opening CMD as admin, then proceed... For me, winget was installed correctly, but had an issue with regular user credentials/permissions. |
same problem this happened out of no where, I was able to install apps with winget and was able to use it all the time, now Get-Command winget
and winget as a command doesn't get recognised in cmdline ... |
When I open Windows Terminal sometimes, and type in any winget-related command, nothing shows up and it acts like the enter key was pressed.
for example:
PS C:\Users\<<user>>> winget
PS C:\Users\<<user>>>
The text was updated successfully, but these errors were encountered: