-
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
Discord does not install #189
Comments
Console output:
|
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 |
Same issue with |
I reckon there've been no fixes from Microsoft because |
I have the same problema with Git. |
@beppler are you really sure that winget's parent process was started with elevated privileges? In your log it says:
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:
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). |
This comment has been minimized.
This comment has been minimized.
I get the IT policy error as well. Running winget via non-admin prompt, Discord errors with a reference to ProgramData path. EDIT: Install also fails when running via elevated (admin perms) prompt. Again programdata error, but winget in this case sees the install as successful. |
I'm seeing the same behaviour in winget v1.0.11451 trying to install GitHub.GitHubDesktop (2.8.2) from an elevated prompt. Found GitHub Desktop [GitHub.GitHubDesktop] |
I have found out something interesting: WinGet will let you know the URL from which it downloads the installer, so I decided to check whether the actual installer itself is at fault here, and it seems it is not, but I'm also not quite sure what's going on here. For one, if you try to run the Discord installer WinGet downloads into If you download the EXE file through your browser instead or you decide to copy the EXE file WinGet downloaded to a new file, then both installer copies will work just fine. (EDIT: I double-checked with SHA256 hash checks and all hashes matched.) Maybe this will help someone else to debug this? I am currently wandering through the source code and setting up for step-by-step debugging to find out what's going on, up until now I've found nothing useful other than this observation. |
Looks like after doing repair and reset for the app installer package, discord was able to install from an unelevated prompt. I'll test it with more packages. |
I wanted to reproduce the issue with step-by-step debugging but I was completely unable to do so. Builds done of the released version *weirdly, I had to make VS ignore some minor warnings from the SDK such as C6285 in order to make it work |
Decided to follow @electronic-dk and run |
@icedream we've seen instances where the file path ends up being too long in some cases. I wouldn't be surprised if there were some other installer specific edge cases as well. |
Some info that may help investigate: I also hit the "Unable to write to C:\ProgramData\ - IT Policies may be restricting writing to this folder" issue. So yeah, wouldn't be surprised if repair and reset fixes it since those likely recreate the permissions on the appdata as well. |
Looks like @icedream found it was the directory, just as you did @sreadingMSFT . Most likely the issue has been this ACL the entire time, and we need to ensure that our temp directory does not inherit it. Good to know that the repair and/or reset is fixing it while we work on an fix in the code to ensure that it doesn't happen. |
Doing the same that @icedream i can install postman |
Move the temp directory that is used from the package specific temp to the user's temp location. This should prevent the Mandatory Low ACL that was apparently causing #189 from being inherited. While this is more avoiding the problem than fixing it, given the relatively low rate of occurrence it might be hard to ensure that it was truly fixed by actually changing the ACLs (and would require much more time and code to write). Additionally changes the behavior of `Runtime::GetPathTo` to delete non-directories when they are encountered rather than just erroring directly.
I noticed that all installers in %localappdata%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\TempState\WinGet are in some sort of jail because if I try to move any of them to desktop I will get this popup Maybe this will help to resolve all thouse access denied and IT policies things what some packages are facing. |
That warning is caused by the files being tagged for a zone that is considered a warning by your Internet settings, could setting the zone be messing with the installers somehow? Maybe they are trying to extract or run something and end up getting redirected for some reason due to the security issue? |
It's some security issue on TempState folder. I renamed it and created new and problem went away. |
This is irrelevant to the behavior of the installers and only determines whether Windows will explicitly ask you whether it should allow running the installer or not. The real reason has already been found with this comment. |
had to run as adminstrator to resolve my issue |
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).
Steps to reproduce
winget install Discord
commandExpected behavior
Discord installs properly
Actual behavior
Installation fails
Environment
The text was updated successfully, but these errors were encountered: