Winget-cli: Can't install anything?

Created on 20 May 2020  路  6Comments  路  Source: microsoft/winget-cli

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

  1. Change a mystery setting somewhere
  2. winget install <any valid package>
  3. 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.

image

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
Issue-Feature

Most helpful comment

Have you tried running the terminal as admin?

All 6 comments

Have you tried running the terminal as admin?

@blacklightpy Just tried it. No difference.

Running in powershell as Administrator worked for me.

I don't doubt that the problem is probably something I've done to my system and that my situation probably isn't a common case that people will run into. But with error messages like "Make sure your temp folder is valid" fixing this is going to be a shot in the dark.

We may be able to determine more helpful dialog for this situation.

I am running into the same issue. When running the command

winget install Insomnia.Insomnia
I get the error message that is displayed in the original post to this issue. If I run it as Administrator in Powershell I get

An unexpected error occurred while executing the command:
rename: Access is denied.: "C:\Users\DCCoder\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\TempState\WinGet\Insomnia.Insomnia.2020.3.3", "C:\Users\DCCoder\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\TempState\WinGet\Insomnia.Insomnia.2020.3.3.exe"

Update

I tried
winget install vim
in Administrator Powershell and got the error message in OP, I immediately reran it and it succeeded. Seems like it may be an intermittent issue?

Was this page helpful?
0 / 5 - 0 ratings