Headless mode never loads the elevator, so admin updates fail with "the elevation tool could not be found" · Issue #5541 · Devolutions/UniGetUI · GitHub
Skip to content

Headless mode never loads the elevator, so admin updates fail with "the elevation tool could not be found" #5541

Open

Description

@jkoz-0

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.

UniGetUI Version

2026.3.2, Scoop install. Same code in 2026.3.1.

Windows version, edition, and architecture

Windows 11 Home, build 26300, 64-bit

Describe your issue

When UniGetUI runs with --headless, any update that needs admin rights fails right away. winget never starts. The operation output says "This operation requires administrator privileges, but the elevation tool could not be found."

The same update works when UniGetUI is open as a normal window.

I think the cause is that HeadlessDaemonHost.RunAsync only calls PrepareForCurrentPlatform, LoadLoaders, LoadManagers and MaintenanceScheduler.StartHeadless. It never calls LoadElevatorAsync, which only AvaloniaBootstrapper runs. So CoreData.ElevatorPath stays empty in headless mode, and AbstractProcessOperation stops on the empty FileName.

Steps to reproduce the issue

  1. Start UniGetUI with --headless
  2. Run: uniget package update --manager winget --id Microsoft.VisualStudio.2022.BuildTools
  3. The reply has status error and the line above. winget writes no log for it.
  4. Quit it, open UniGetUI normally and run the same command. Now winget runs.

UniGetUI Log

WinGet package Microsoft.VisualStudio.2022.BuildTools is installed on a system-wide scope, forcing administrator rights...
[AgentBroker] ShouldUseAgentBroker check: eligible=False, manager=Winget, virtualSource=False
Executing process with StartInfo:
 - FileName: ""
 - Arguments: ""C:\Users\****\AppData\Local\Microsoft\WindowsApps\winget.exe"  update --id "Microsoft.VisualStudio.2022.BuildTools" --exact --source winget --accept-source-agreements --disable-interactivity --silent --include-unknown --accept-package-agreements --force"
This operation requires administrator privileges, but the elevation tool could not be found. The operation cannot continue.
Visual Studio BuildTools 2022 could not be updated

Package Managers Logs

winget never ran for this operation, so it has no log for it.

Relevant information

UniGetUI Elevator.exe is there in Assets\Utilities in both versions. Calling LoadElevatorAsync from the headless host as well would fix it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions