Repository navigation
[BUG] "Ask for administrator privileges once for each batch" can still show multiple UAC prompts with parallel operations set to 1 #5442
Description
Please confirm these before moving forward
- I have searched for my issue and have not found a work-in-progress/duplicate/resolved issue.
- I have tested that this issue has not been fixed in the latest (beta or stable) release.
- I have checked the FAQ section for solutions.
- This issue is about a bug (if it is not, please use the correct template).
UniGetUI Version
2026.3.0
Windows version, edition, and architecture
Microsoft Windows 11 Pro 25H2 · Build 26200.9457 · x64
Describe your issue
I have enabled the option "Ask for administrator privileges once for each batch of operations".
The separate option "Ask only once for administrator privileges" is disabled, and the maximum number of parallel operations is set to 1.
When I start multiple package updates together as one batch, UniGetUI can still display multiple UAC prompts for package operations that require elevation.
In one reproducible test, I started a batch of 7 WinGet updates. Three packages required administrator privileges:
- CodecGuide.K-LiteCodecPack.Full
- Notepad++.Notepad++
- Microsoft.WindowsADK
Although all three operations belonged to the same batch and were processed sequentially, I received 3 separate UAC prompts.
The UniGetUI logs show that all three elevated operations were launched through "UniGetUI Elevator.exe" and that the same administrator-rights cache process ID was used until the batch completed.
With "Ask for administrator privileges once for each batch of operations" enabled, I would expect one UAC confirmation to be reused for all elevated package operations within that batch.
Steps to reproduce the issue
-
Open UniGetUI Settings.
-
Under the administrator/elevation settings:
- Enable "Ask for administrator privileges once for each batch of operations".
- Leave "Ask only once for administrator privileges" disabled.
- Set the maximum number of parallel operations to 1.
-
Make sure multiple WinGet updates are available, including more than one package that requires elevation.
-
Start all selected updates together as one batch.
-
Approve the UAC prompts as they appear.
-
Observe that multiple UAC prompts can be shown during the same batch.
In my reproducible test, the batch contained 7 updates. Three of them required elevation:
- CodecGuide.K-LiteCodecPack.Full
- Notepad++.Notepad++
- Microsoft.WindowsADK
All operations were processed sequentially because the parallel operation limit was set to 1, but 3 separate UAC prompts were shown.
UniGetUI Log
Relevant excerpt from ICS-PC01-session.log:
[2026-09-27 12:16:00 ] WinGet package CodecGuide.K-LiteCodecPack.Full requires elevation, forcing administrator rights...
[2026-09-27 12:16:00 ] Caching admin rights for process id 20532
[2026-09-27 12:17:32 ] WinGet package Notepad++.Notepad++ requires elevation, forcing administrator rights...
[2026-09-27 12:17:32 ] Caching admin rights for process id 20532
[2026-09-27 12:17:45 ] WinGet package Microsoft.WindowsADK requires elevation, forcing administrator rights...
[2026-09-27 12:17:45 ] Caching admin rights for process id 20532
[2026-09-27 12:19:16 ] Clearing UAC prompt since there are no remaining operations
[2026-09-27 12:19:16 ] Resetting administrator rights cache for process id 20532
The complete ICS-PC01-session.log is attached.
Package Managers Logs
Relevant package manager operation logs:
K-Lite Codec Pack Full:
Executing process with StartInfo:
- FileName: "C:\Program Files\UniGetUI\Assets\Utilities\UniGetUI Elevator.exe"
- Arguments: ""C:\Users\gufa\AppData\Local\Microsoft\WindowsApps\winget.exe" update --id "CodecGuide.K-LiteCodecPack.Full" --exact --source winget --accept-source-agreements --disable-interactivity --silent --include-unknown --accept-package-agreements --force"
The operation completed successfully with return value 0.
Notepad++:
Executing process with StartInfo:
- FileName: "C:\Program Files\UniGetUI\Assets\Utilities\UniGetUI Elevator.exe"
- Arguments: ""C:\Users\gufa\AppData\Local\Microsoft\WindowsApps\winget.exe" update --id "Notepad++.Notepad++" --exact --source winget --accept-source-agreements --disable-interactivity --silent --include-unknown --accept-package-agreements --force"
The operation completed successfully with return value 0.
Windows Assessment and Deployment Kit:
Executing process with StartInfo:
- FileName: "C:\Program Files\UniGetUI\Assets\Utilities\UniGetUI Elevator.exe"
- Arguments: ""C:\Users\gufa\AppData\Local\Microsoft\WindowsApps\winget.exe" update --id "Microsoft.WindowsADK" --exact --source winget --accept-source-agreements --disable-interactivity --silent --include-unknown --accept-package-agreements --force"
The operation completed successfully with return value 0.
The complete operation logs for all three packages are attached.
Relevant information
ICS-PC01-session.log
UniGetUI-Protokoll_K-LiteCodecPack.txt
UniGetUI-Protokoll_Notepad++.txt
UniGetUI-Protokoll_WindowsADK.txt
Screenshots and videos
No response
Activity
GabrielDuf commentedon Sep 28, 2026
Hi fabergen,
I've looked into it and found two issues on our side:
Caching admin rights…message is logged before the attempt, so it doesn't guarantee the cache was actually created.I'll fix both of them.
That said, neither fully explains the three prompts. Re-requesting an existing cached session shouldn't prompt again, so it looks like the session may be disappearing between operations.
Could you run these in PowerShell while a batch is running, ideally between two packages?
If the process and pipe are still there, the session is alive and we'll need to look elsewhere. If not, the session is being lost, and the registry command may help explain why.
fabergen commentedon Oct 1, 2026
Hi,
I ran the requested checks every 2 seconds during full update batches on four systems.
UAC prompts observed:
The interesting case is ICS-NB02. On that system, the cached elevation session did not disappear between operations.
The relevant sequence was:
During the whole period between the initial cache creation and the final reset, the same gsudo named-pipe session remained present. For example, the pipes were still there immediately after the Notepad++ elevation request, and also while PDF-XChange Editor was being started.
UniGetUI also kept using the same process id 10572 for the cache requests and only reset the cache after the last operation.
Immediately before the reset, the gsudo pipes were still present. They disappeared only after UniGetUI had cleared/reset the cache.
So at least in this Windows 10 test, the second UAC prompt cannot be explained by the cached gsudo session disappearing between package operations.
One additional observation on the same system: the desktop shortcut PDF-XChange Editor was left behind after the update. I do not see a protected-shortcut cleanup/relaunch entry in the current UniGetUI session log for this run, so I cannot say whether that is related to the second UAC prompt.
I have attached the diagnostic logs from all four systems, plus the complete UniGetUI session.log from ICS-NB02.
session.log
UniGet-Credentials-Test.PS1-(ICS-PC01_GUFA).log
UniGet-Credentials-Test.PS1-(ICS-PC02_SIWE).log
UniGet-Credentials-Test.PS1-(ICS-NB02_GÜNTER).log
UniGet-Credentials-Test.PS1-(ICS-NB01_GUFA).log
GabrielDuf commentedon Oct 7, 2026
Hi fabergen, thanks, these diagnostics narrowed it down.
The cached session is staying alive between operations, so my earlier theory about it disappearing was wrong. More importantly, ICS-PC01 produced 3 prompts in the first report and 1 in the re-test on the same build, which pointed to a race rather than a configuration issue.
The problem was in
cache on: the elevator waits up to two seconds for its credentials service to start, but returns exit code 0 even if the service isn't ready. UniGetUI trusted that code, so on a slow start it assumed the cache was available and each elevated package fell back to its own UAC prompt.fabergen commentedon Oct 24, 2026
Hi,
I tested this again today with UniGetUI 2026.3.2.0, and unfortunately the user-visible problem from #5442 is still reproducible.
I updated these three packages together in one batch:
My relevant settings are:
During this single batch I received three administrator/UAC credential prompts.
The important difference compared with my original report is that the cache race fixed by #5483 does not seem to be the cause this time.
The log explicitly confirms that the cache was successfully established:
The cache remained active until the end of the batch:
However, while that cache was active, UniGetUI also attempted to remove the protected PDF-XChange desktop shortcut:
So there is an additional elevation path for protected-shortcut cleanup while the batch administrator-rights cache is already active.
I also noticed that the WinGet manifest for Microsoft.PowerShell 7.6.8.0 contains machine-scope MSI installers with:
UniGetUI did not log a
forcing administrator rightsmessage for the PowerShell update in this run.I cannot determine from
session.logalone which of the three visible prompts belonged to which elevation path, so I do not want to overstate the cause.But from the user perspective the expected behavior is still:
If “ask once per batch” is enabled, all UniGetUI-controlled elevation operations belonging to that batch should reuse the same administrator-rights cache, including protected-shortcut cleanup.
So #5483 appears to have fixed the original cache-establishment race, but multiple credential prompts can still occur within one batch on UniGetUI 2026.3.2.0.
I have attached a sanitized excerpt from the current
session.logcontaining only the relevant batch, cache and shortcut-cleanup entries.Relevant code:
https://github.com/Devolutions/UniGetUI/blob/v2026.3.2/src/UniGetUI.Core.Tools/ShortcutFileRemover.cs
PowerShell 7.6.8.0 WinGet manifest:
https://github.com/microsoft/winget-pkgs/blob/master/manifests/m/Microsoft/PowerShell/7.6.8.0/Microsoft.PowerShell.installer.yaml
UniGetUI-2026.3.2-UAC-session-excerpt-2026-10-24.log