Winget-cli: Discord does not install

Created on 19 May 2020  路  12Comments  路  Source: microsoft/winget-cli

Brief description of your issue

When trying to install Discord via winget, installer throws an error about lack of permission to copy file. Doesn't matter if this is done via Windows Terminal launched as admin or not (in the latter case, error left in console is different and only second error from attached screenshot is displayed).

error

Steps to reproduce

  1. Launch Windows Terminal as admin
  2. Issue winget install Discord command

Expected behavior

Discord installs properly

Actual behavior

Installation fails

Environment

Windows Package Manager v0.1.41331
Windows: Windows.Desktop v10.0.19041.264
Package: Microsoft.DesktopAppInstaller v1.0.41331.0
Issue-Bug

Most helpful comment

+1, a bunch of apps all failed to install for me with this same error.

All 12 comments

Console output:

  1. When run as admin:
C:\Users\revanmj>winget install Discord
Found Discord [Discord.Discord]
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://dl.discordapp.net/apps/win/0.0.306/DiscordSetup.exe
  鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅  59.7 MB / 59.7 MB
Successfully verified installer hash
Installing ...
Successfully installed!
An unexpected error occurred while executing the command:
remove: Access Denied: "C:\Users\revanmj\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\TempState\WinGet\Discord.Discord.0.0.306.exe"
  1. When run as normal user:
C:\Users\revanmj>winget install Discord
Found Discord [Discord.Discord]
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://dl.discordapp.net/apps/win/0.0.306/DiscordSetup.exe
  鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅  59.7 MB / 59.7 MB
Successfully verified installer hash
Installing ...
Installer failed with exit code: 4294967295

The admin install is trying to remove the downloaded installer after a success. It should be installed in that case, but we need to fix the timing issue there.

As a normal user, that is a very unhelpful error code that they are returning, but I expect that they require Admin to install since they are writing to ProgramData.

There is no shortcut in Start Menu or entry in Add/Remove Apps panel, so winget wrongly assumes that install was successfull.

To add more context - first error from screenshot is displayed when status in console is still "Installing". Second one is displayed at the same time as the error in the console.

+1, a bunch of apps all failed to install for me with this same error.

My issue got closed as a duplicate but I get "Access Denied" and it's definitely not installed. Seems like a lot of different behaviors are being lumped in as duplicates of this, is it all the same underlying cause?

I get access denied as https://github.com/microsoft/winget-pkgs/issues/1367 but installation was successful

I get the same issue with Telegram.TelegramDesktop and Axosoft.GitKraken. Should this issue be renamed with a broader description?

Same issue with Atlassian.Sourcetree

I reckon there've been no fixes from Microsoft because Git.Git also doesn't install.

I have the same problema with Git.
It works if my user is administrator and I run winget in an elevated prompt.
If my user is a normal account even if I run an elevated prompt (using an administrator account) it fails.

Git.Git.2.28.0.log

@beppler are you really sure that winget's parent process was started with elevated privileges? In your log it says:

 User privileges: None

Which implies that your process was only ran with the standard user access token. What's your UAC configuration?

Yes, I made the wrong test, If I my account is not an administrator and I start an elevated prompt (my UAC configuration is default), after type my credentials and try to run winget I'm getting the following message:

PS C:\Users\adm-beppler> winget
ResourceUnavailable: Program 'winget.exe' failed to run: The file cannot be accessed by the system.At line:1 char:1
+ winget
+ ~~~~~~.

If I try to install Git using the normal account the error is that in the log I sent.

If I switch user to the administrative account (MPS\adm-beppler), I can install it (after open an administrative prompt).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TomBrien picture TomBrien  路  4Comments

sob picture sob  路  5Comments

jasperweiss picture jasperweiss  路  3Comments

denelon picture denelon  路  4Comments

Callidior picture Callidior  路  5Comments