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
Unable to install programs which require Admin #2740
Winget is unable to install programs which require Admin.
Winget disables inheritance on the C:\Users\username\AppData\Local\Temp\WinGet folder so the administrator accounts can't access it.
Even after manually enabling inheritance, the next winget install disables it again and fails.
Steps to reproduce
winget install any program that requires an Admin password
Expected behavior
The program installs.
Actual behavior
The program fails installing with the error The network name cannot be found, or similar.
Environment
Windows Package Manager (Preview) v1.4.3132-preview
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.19045.2311
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.19.3132.0
Reacted by Jason Yang, Sean Martin, jdelker, Alexander Sanoll, Dan Stevens, grimvar, broAZ42, dstromski, Daniel Barnes, Jonas Schwabe and 7 more
filiphorvat (@filiphorvat) Can you run an instance of this with winget install <package> --verbose-logs and share the log file? The location is displayed via winget --info.
Here it is for winget install wiztree --verbose-logs: WinGet-2022-12-05-18-22-32.594.log
Looks like this after typing in the admin password:
Or like this when installing Steam:
Here's the log for Steam: WinGet-2022-12-05-18-34-06.014.log
Even manually running the installer from the temp directory doesn't work if I don't re-enable inheritance.
The same behavior for me on Windows 11. Normal user without administrator rights tries to install a program with winget. Winget loads the installation files
to C:\Users\USERNAME\AppData\Local\Temp\WinGet, sets own permissions. Full access for the current account and system and removes inheritance. The local administrator has no rights to the directory. Then WinGet requests the administrator rights. After that winget aborts with an error that it cannot access the installation files. Which was predictable if the local administrator lacks the rights. Apparently the Winget developers always work with administrator rights, otherwise they would have noticed the error immediately.
Can confirm we are able to replicate it on our tenant with onenote as it uses an exe
As a workaround we are downloading it from the ms website
It happens both on the store or through winget
I can confirm that this is fixed in 1.5 preview of winget. I really wonder why this bug even made it to a release. Does nobody really work without admin rights?
I can confirm that this is fixed in 1.5 preview of winget. I really wonder why this bug even made it to a release. Does nobody really work without admin rights?
the administrator account is being removed from the winget folder found in the temp folder every time the store reloads, why is this happening, Microsoft should be keeping the administrator privileges on this folder?
Activity
denelon commentedon Dec 5, 2022
filiphorvat (@filiphorvat) Can you run an instance of this with
winget install <package> --verbose-logsand share the log file? The location is displayed viawinget --info.filiphorvat commentedon Dec 5, 2022
Here it is for

winget install wiztree --verbose-logs:WinGet-2022-12-05-18-22-32.594.log
Looks like this after typing in the admin password:
Or like this when installing Steam:

Here's the log for Steam:
WinGet-2022-12-05-18-34-06.014.log
Even manually running the installer from the temp directory doesn't work if I don't re-enable inheritance.
jueti commentedon Dec 20, 2022
same as me, my settings via
winget settingswinver: Windows Server 2022 Standard 21H2 20348.1311
{ "$schema": "https://aka.ms/winget-settings.schema.json", // For documentation on these settings, see: https://aka.ms/winget-settings // "source": { // "autoUpdateIntervalInMinutes": 5 // }, "telemetry": { "disable": true }, "network": { "downloader": "wininet" }, "source": { "autoUpdateIntervalInMinutes": 360 }, //"logging": { // "level": "verbose" //}, "installBehavior": { "preferences": { "scope": "machine" } } }AlexDe74 commentedon Jan 10, 2023
same as here #2665
MS ignores it.
To install any programs with EXE Installers I do:
Really good user experience....
ghborger commentedon Feb 1, 2023
The same behavior for me on Windows 11. Normal user without administrator rights tries to install a program with winget. Winget loads the installation files
to C:\Users\USERNAME\AppData\Local\Temp\WinGet, sets own permissions. Full access for the current account and system and removes inheritance. The local administrator has no rights to the directory. Then WinGet requests the administrator rights. After that winget aborts with an error that it cannot access the installation files. Which was predictable if the local administrator lacks the rights. Apparently the Winget developers always work with administrator rights, otherwise they would have noticed the error immediately.
rand0muser123 commentedon Feb 2, 2023
Can confirm we are able to replicate it on our tenant with onenote as it uses an exe
As a workaround we are downloading it from the ms website
It happens both on the store or through winget
boozeman commentedon Feb 2, 2023
Hi,
How about the feature where you can set the download directory for winget packages in settings file? Some directory where all the users has rw-rights.
nk111 commentedon Apr 18, 2023
I can confirm that this is fixed in 1.5 preview of winget. I really wonder why this bug even made it to a release. Does nobody really work without admin rights?
Masamune3210 commentedon Apr 18, 2023
Principle of least privilege says you shouldn't
UnidentifiedTag commentedon Jun 28, 2023
same error Windows 11 22H2
the administrator account is being removed from the winget folder found in the temp folder every time the store reloads, why is this happening, Microsoft should be keeping the administrator privileges on this folder?