[BUG] user temp/Winget directory only admin accessible after running with gsudo
Please confirm these before moving forward
- [X] I have searched for my issue and have not found a work-in-progress/duplicate/resolved issue.
- [X] I have tested that this issue has not been fixed in the latest (beta or stable) release.
- [X] I have checked the FAQ section for solutions.
- [X] This issue is about a bug (if it is not, please use the correct template).
UniGetUI Version
3.1.1
Windows version, edition, and architecture
Windows 11 Business 22631.4169
Describe your issue
I am running as a user and I have checked the "ask for admin privileges once per batch" option. I have run into the issue that winget became unusable after running UniGetUI. It turns out that the Winget directory in my user's %temp% directory belongs to the admin user now and can't be accessed/read by my user. Once I remove the directory, everything's back to normal.
Steps to reproduce the issue
- Run UniGetUI winget updates with "ask for admin privileges once per batch" option (I have it in German: "Nur einmal nach Administratorrechten für jeden Stapel von Vorgängen fragen").
- winget becomes unusable (access denied error)
UniGetUI Log
[02.10.2024 08:39:13] __ __ _ ______ __ __ ______
/ / / /___ (_) ____/__ / /_/ / / / _/
/ / / / __ \/ / / __/ _ \/ __/ / / // /
/ /_/ / / / / / /_/ / __/ /_/ /_/ // /
\____/_/ /_/_/\____/\___/\__/\____/___/
Welcome to UniGetUI Version 3.1.1
[02.10.2024 08:39:13]
[02.10.2024 08:39:13] Version Code: 3,11
[02.10.2024 08:39:13] System.FormatException: The input string '850.' was not in a correct format.
at System.Number.ThrowFormatException[TChar](ReadOnlySpan`1 value)
at System.Int32.Parse(String s)
at UniGetUI.Core.Data.CoreData.GetCodePage() in C:\SomePrograms\WingetUI-Store\src\UniGetUI.Core.Data\CoreData.cs:line 26
[02.10.2024 08:39:13] Encoding Code Page set to 0
[02.10.2024 08:39:13] Using bundled GSudo at C:\Users\r.katzer\AppData\Local\Programs\UniGetUI\Assets\Utilities\gsudo.exe
[02.10.2024 08:39:13] Loaded language locale: de
[02.10.2024 08:39:14] Randomly-generated background API auth token for the current session: ys2jigd5iyosfur9ftqcplz57hcqd658ve684h3c6yxfzq3lnn2437dnaamcej6c
[02.10.2024 08:39:14] Api running on http://localhost:7058
[02.10.2024 08:39:14] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
█ Name: Chocolatey
█ Enabled: True
█ Found: False
█ THE MANAGER WAS NOT FOUND. PERHAPS IT IS NOT
█ INSTALLED OR IT HAS BEEN MISCONFIGURED
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[02.10.2024 08:39:15] Lang files were updated successfully from GitHub
[02.10.2024 08:39:15] UniGetUI is up to date
[02.10.2024 08:39:15] Command npm was not found on the system
[02.10.2024 08:39:15] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
█ Name: Npm
█ Enabled: True
█ Found: False
█ THE MANAGER WAS NOT FOUND. PERHAPS IT IS NOT
█ INSTALLED OR IT HAS BEEN MISCONFIGURED
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[02.10.2024 08:39:15] Downloaded new icons and screenshots successfully!
[02.10.2024 08:39:15] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
█ Name: .NET Tool
█ Enabled: True
█ Found: False
█ THE MANAGER WAS NOT FOUND. PERHAPS IT IS NOT
█ INSTALLED OR IT HAS BEEN MISCONFIGURED
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[02.10.2024 08:39:16] Command scoop was not found on the system
[02.10.2024 08:39:16] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
█ Name: Scoop
█ Enabled: True
█ Found: False
█ THE MANAGER WAS NOT FOUND. PERHAPS IT IS NOT
█ INSTALLED OR IT HAS BEEN MISCONFIGURED
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[02.10.2024 08:39:16] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
█ Name: Pip
█ Enabled: True
█ Found: True
█ Fancy exe name: pip
█ Executable path: C:\Users\r.katzer\AppData\Local\Programs\Python\Python312\python.exe
█ Call arguments: -m pip
█ Version:
█ pip 24.2 from C:\Users\r.katzer\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip (python 3.12)
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[02.10.2024 08:39:16] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
█ Name: Winget
█ Enabled: True
█ Found: True
█ Fancy exe name: winget.exe
█ Executable path: C:\Users\r.katzer\AppData\Local\Microsoft\WindowsApps\winget.exe
█ Call arguments:
█ Version:
█ System WinGet CLI Version: v1.8.1911
█ Microsoft.WinGet.Client PSModule version: ""
█ Using Native WinGet helper (COM Api)
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[02.10.2024 08:39:19] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
█ Name: PowerShell
█ Enabled: True
█ Found: True
█ Fancy exe name: powershell.exe
█ Executable path: C:\Windows\system32\windowspowershell\v1.0\powershell.exe
█ Call arguments: -NoProfile -Command
█ Version:
█ Name Value
█ ---- -----
█ PSVersion 5.1.22621.4111
█ PSEdition Desktop
█ PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
█ BuildVersion 10.0.22621.4111
█ CLRVersion 4.0.30319.42000
█ WSManStackVersion 3.0
█ PSRemotingProtocolVersion 2.3
█ SerializationVersion 1.1.0.1
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[02.10.2024 08:39:19] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
█ Name: PowerShell7
█ Enabled: True
█ Found: True
█ Fancy exe name: pwsh.exe
█ Executable path: C:\Program Files\PowerShell\7\pwsh.exe
█ Call arguments: -NoProfile -Command
█ Version:
█ PowerShell 7.4.5
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[02.10.2024 08:39:20] Resetting administrator rights cache for process id 23728
[02.10.2024 08:39:21] Microsoft.Powershell.Client detection has been forcefully skipped as the module is not required on the current context
[02.10.2024 08:39:21] Dependency WinGet PowerShell Module for manager Winget is present
[02.10.2024 08:39:21] LoadComponentsAsync finished executing. All managers loaded. Proceeding to interface.
[02.10.2024 08:39:25] Found 0 installed packages from PowerShell
[02.10.2024 08:39:26] Found 98 installed packages from Pip
[02.10.2024 08:39:26] Found 0 available updates from PowerShell
[02.10.2024 08:39:26] Found 40 installed packages from PowerShell7
[02.10.2024 08:39:32] Found 4 available updates from Pip
[02.10.2024 08:39:34] Found 7 available updates from Winget
[02.10.2024 08:39:34] Found 220 installed packages from Winget
[02.10.2024 08:39:54] Found 40 available updates from PowerShell7
[02.10.2024 08:40:56] Non-MSStore WinGet Native Icons have been forcefully disabled on code
[02.10.2024 08:40:56] Icon for package Zoom.Zoom.EXE was not found, returning default icon
[02.10.2024 08:40:56] Caching admin rights for process id 23728
[02.10.2024 08:41:07] Resetting administrator rights cache for process id 23728
Package Managers Logs
Manager WinGet with version:
System WinGet CLI Version: v1.8.1911
Microsoft.WinGet.Client PSModule version: ""
Using Native WinGet helper (COM Api)
——————————————————————————————————————————
Logged native task on manager Winget. Task type is ListSources
Process start time: 02.10.2024 08:39:16
Process end time: 02.10.2024 08:39:16
-- Task information
...
The task reported success
——————————————————————————————————————————
Logged subprocess-based task on manager Winget. Task type is RefreshIndexes
Subprocess executable: "C:\Users\r.katzer\AppData\Local\Microsoft\WindowsApps\winget.exe"
Command-line arguments: " source update --disable-interactivity"
Process start time: 02.10.2024 08:39:19
Process end time: 02.10.2024 08:39:21
-- Process STDOUT
...
Return code: SUCCESS (0)
——————————————————————————————————————————
Logged native task on manager Winget. Task type is ListInstalledPackages
Process start time: 02.10.2024 08:39:19
Process end time: 02.10.2024 08:39:34
-- Task information
...
The task reported success
——————————————————————————————————————————
Logged native task on manager Winget. Task type is ListSources
Process start time: 02.10.2024 08:39:20
Process end time: 02.10.2024 08:39:21
-- Task information
...
The task reported success
——————————————————————————————————————————
Logged native task on manager Winget. Task type is ListUpdates
Process start time: 02.10.2024 08:39:25
Process end time: 02.10.2024 08:39:34
-- Task information
...
The task reported success
——————————————————————————————————————————
Relevant information
No response
Screenshots and videos
No response
@klangme1ster, if you run UniGetUI as administrator, and then disable batch operations, does WinGet still get corrupted when running non-elevated?
@marticliment, the %temp%/Winget directory is again not user-readable, even if I only run a single update as admin.
Hello,
Please try UniGetUI 3.1.2-beta4. It has a built-in troubleshooter for WinGet that is supposed to fix this issue.
Download it here: https://github.com/marticliment/UniGetUI/releases/tag/3.1.2-beta4