You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows cannot access the folder where the download happens during 'upgrade' #2984
when i try a winget upgrade 'package' for a package that installs in program files, i get the attached error. I am running in standard user mode. I am sure that admin has access to the folder.
Steps to reproduce
type winget upgrade 'package name'
wait for the download
type in the admin password
get the error message
Expected behavior
I expected the program to install properly
Actual behavior
The application errors out and does not install if it requires admin
Environment
Windows Package Manager v1.4.10173
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.22621.1265
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.19.10173.0
Logs: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Links
---------------------------------------------------------------------------
Privacy Statement https://aka.ms/winget-privacy
License Agreement https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale
This happens for most applications that require admin. something about not being able to access the network or directory. but the directory has full privileges.
when i try a winget upgrade 'package' for a package that installs in program files, i get the attached error. I am running in standard user mode. I am sure that admin has access to the folder.
The problem is with the temp directory winget uses for install.
This is located at %LOCALAPPDATA%\temp\WinGet and simply has insufficient permissions for an elevated permission install.
So effectively the given admin account is unable to read files from this directory.
Unfortunately, it doesn't help to adjust the permissions for this directory manually, because winget resets it during upgrade.
This problem already persists for months now and I've no clue why this hasn't been fixed yet. Actually it should affect many users, if not all uses.
Reacted by Prometheus720, ondrejsv, Jonathan Karamavros and Soham Dasgupta
I saw this too. When trying to install "7zip.7zip": Winget install 7zip.7zip
I got the problem mentioned by the original poster. It seems to be related to the repository and happening with user elevation. If I use this instead: winget install "7-zip" --source msstore
Then it will install. So, I guess other repositories are buggy
I also face this issue for anything requiring admin. I was trying to install Oracle.Virtualbox but I also tried to upgrade existing packages, and it failed with the same network error.
The problem is with the temp directory winget uses for install. This is located at %LOCALAPPDATA%\temp\WinGet and simply has insufficient permissions for an elevated permission install. So effectively the given admin account is unable to read files from this directory. Unfortunately, it doesn't help to adjust the permissions for this directory manually, because winget resets it during upgrade.
This problem already persists for months now and I've no clue why this hasn't been fixed yet. Actually it should affect many users, if not all uses.
What I can't understand is why it doesn't affect every package that needs admin elevation. Some of the programs I have installed can still be updated via winget, others can't.
io43
I tried to do what you said, But from the admin command, I get this:
Winget uninstall 7zip.7zip
No installed package found matching input criteria.
I tried with the "Runas" command with different switches: "/profile", "/noprofile", "/env", and no switch at all and I always get that error. I even tried running "cmd" from the start menu as administrator, but still the same result.
From my normal user, the package will be found, but I will get the error from the original poster.
That's why I switched to chocolatey. There I have to run the console as admin as well, but at least this works.
I moved away from winget to scoop because of this specific bug. My work laptop is configured to use a non-admin account for everyday work and occasionally use a different admin account to run stuff elevated.
This bug is already fixed in the 1.5 version.
You may download the preview version in the Releases tab and I can confirm that this issue is no longer present.
Activity
coeus89 commentedon Feb 18, 2023
This happens for most applications that require admin. something about not being able to access the network or directory. but the directory has full privileges.
coeus89 commentedon Feb 18, 2023
PapysGit commentedon Feb 26, 2023
Facing the exact same issue.
jdelker commentedon Mar 11, 2023
The problem is with the temp directory winget uses for install.
This is located at
%LOCALAPPDATA%\temp\WinGetand simply has insufficient permissions for an elevated permission install.So effectively the given admin account is unable to read files from this directory.
Unfortunately, it doesn't help to adjust the permissions for this directory manually, because winget resets it during upgrade.
This problem already persists for months now and I've no clue why this hasn't been fixed yet. Actually it should affect many users, if not all uses.
jmeile commentedon Mar 17, 2023
I saw this too. When trying to install "7zip.7zip":
Winget install 7zip.7zipI got the problem mentioned by the original poster. It seems to be related to the repository and happening with user elevation. If I use this instead:
wingetinstall "7-zip" --source msstoreThen it will install. So, I guess other repositories are buggy
Prometheus720 commentedon Mar 19, 2023
This has been a consistent problem for me and a main reason why I must still rely on other package managers.
loooooooooooor commentedon Mar 31, 2023
I face the exact same issue.
static0verdrive commentedon Apr 16, 2023
I also face this issue for anything requiring admin. I was trying to install Oracle.Virtualbox but I also tried to upgrade existing packages, and it failed with the same network error.
niStee commentedon Apr 27, 2023
What I can't understand is why it doesn't affect every package that needs admin elevation. Some of the programs I have installed can still be updated via winget, others can't.
jmeile commentedon Apr 29, 2023
io43
I tried to do what you said, But from the admin command, I get this:
I tried with the "Runas" command with different switches: "/profile", "/noprofile", "/env", and no switch at all and I always get that error. I even tried running "cmd" from the start menu as administrator, but still the same result.
From my normal user, the package will be found, but I will get the error from the original poster.
That's why I switched to chocolatey. There I have to run the console as admin as well, but at least this works.
thesobercoder commentedon Apr 30, 2023
I moved away from
wingettoscoopbecause of this specific bug. My work laptop is configured to use a non-admin account for everyday work and occasionally use a different admin account to run stuff elevated.ondrejsv commentedon May 13, 2023
This bug is already fixed in the 1.5 version.
You may download the preview version in the Releases tab and I can confirm that this issue is no longer present.
akaegi commentedon May 16, 2023
I can confirm it's working with the preview version (v1.5.1081-preview) 👍
adrian-cancio commentedon May 18, 2023
Yes, working well on current preview
mdanish-kh commentedon May 18, 2023
cc Demitrius Nelon (@denelon) Resolved in #2945