winget-cli: Can't install anything?
Brief description of your issue
I’ve tried installing multiple apps from multiple different developers but have received similar errors for everything.
This is a personal machine that I have complete control and access to. I’m a power user and probably made a change in group policy or UAC that is resulting in these failures.
Steps to reproduce
- Change a mystery setting somewhere
winget install <any valid package>
- Get error
Expected behavior
Installation succeeds or at least a hint towards how to fix the error.
Actual behavior
C:\Users\corey> winget install speccy Found Speccy [Piriform.Speccy] This application is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Downloading https://download.ccleaner.com/spsetup132.exe ██████████████████████████████ 6.57 MB / 6.57 MB Successfully verified installer hash Installing … Installer failed with exit code: 2
I also received a popup saying “Error writing temporary file. Make sure your temp folder is valid.” while the console prompt said “Installing” and had a rotating indicator.
C:\Users\corey> winget install “Google Play Music Desktop Player” Found Google Play Music Desktop Player [SamuelAttard.GooglePlayMusicDesktopPlayer] This application is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Downloading https://github.com/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-/releases/download/v4.7.1/Google.Play.Music.Desktop.Player.Setup.exe ██████████████████████████████ 57.3 MB / 57.3 MB Successfully verified installer hash Installing … Installer failed with exit code: 4294967295
I also received a popup saying “Installation has failed - Unable to write to C:\ProgramData\corey - IT policies may be restricting access to this folder” while the console prompt said “Installing” and had a rotating indicator.
C:\Users\corey> winget install Atom Found Atom [GitHub.Atom] This application is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Downloading https://github.com/atom/atom/releases/download/v1.45.0/AtomSetup-x64.exe ██████████████████████████████ 179 MB / 179 MB Successfully verified installer hash Installing … Installer failed with exit code: 4294967295
I received an identical popup to the Google Play Music package.
I would expect that these installations would work properly on a freshly installed system but somewhere I have a settings change that is impacting winget and I do not know what setting I need to fix.
I noticed that C:\ProgramData\corey didn’t exist. After creating it, the github installers updated their path for example the GooglePlayMusicDesktopPlayer showed the path C:\ProgramData\corey\SquirrelTemp in it’s popup but curiously there was a second popup that says “Installation has failed Failed to extract installer”. The command prompt then claims success with “Successfully installed!” This seems to be a permission issue of some sort.
Environment
[winget --info]
Windows Package Manager v0.1.41331 Preview
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.19041.207
Package: Microsoft.DesktopAppInstaller v1.0.41331.0
Links:
Privacy Statement: https://aka.ms/winget-privacy
License agreement: https://aka.ms/winget-license
3rd Party Notices: https://aka.ms/winget-3rdPartyNotice
Homepage: https://aka.ms/winget
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 3
- Comments: 25 (5 by maintainers)
Have you tried running the terminal as admin?
Running in powershell as Administrator worked for me.
@blacklightpy Just tried it. No difference.
Ensure any relating processes to the application you are trying to upgrade is not running. I have recently found this with Winamp. I had to go into task manager and manually terminate any processes that it was using. Afterwards the install ran fine.
Same here. For me, runing PowerShell as administrator solved it. Winget version v1.1.12702, Anydesk 6.3.3.
Yes, I was referring to SmartScreen. It used to be claimed (some vendors still claim) that purchasing an EV code signing certificate established immediate reputation with SmartScreen, but that must have changed. I mentioned SmartScreen because I ran a failed winget install package manually and up popped SmartScreen saying that Windows had protected my PC… So I thought it must have been SmartScreen “silently” blocking the WinGet install. Those linked PRs look like they will help, certainly with the TempDirectory issue that virtually all the NSIS-based installers I’ve tried seem to run into when installed via WinGet. Thank you!
@Jaifroid if you are referring to SmartScreen, it doesn’t check for signatures.
We are continually working with internal Microsoft services to expose better response codes so we can share what is detected in our validation pipelines.
We have determined at least one class of errors causing some of the installer failures that may be related to the “Failed to extract installer” error. We’re working on cutting a release with a couple of bug fixes for errors we’ve been seeing.
https://github.com/microsoft/winget-cli/pull/1138 https://github.com/microsoft/winget-cli/pull/1146
Re-running the above with --interactive switch produces this popup:
… which is not very informative. But why wold there be an error launching the installer?