microsoft / microsoft/winget-pkgs

[Package Issue]: MartiCliment.UniGetUI — dependency requires elevated installation, actual package denies elevated installation

Open
#198,362 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Bug
Dominant language
No language data
Stars
11.1k
Forks
9.7k
Avg merge
1h 32m
Merged PRs (30d)
376

Description

Please confirm these before moving forward
  • I have searched for my issue and not found a work-in-progress/duplicate/resolved issue.
  • I have not been informed if the issue is resolved in a preview version of the winget client.
Category of the issue

Installation issue.

Brief description of your issue

Running installation elevated, the following error is shown:

>winget install -e --id MartiCliment.UniGetUI
The installer cannot be run from an administrator context.

then running the same command from an unelevated context, the following error occurs instead:

>winget install -e --id MartiCliment.UniGetUI
Found UniGetUI (formerly WingetUI) [MartiCliment.UniGetUI] Version 3.1.3
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
This package requires the following dependencies:
  - Packages
      Microsoft.EdgeWebView2Runtime [>= 129.0.2792.89]
      Microsoft.VCRedist.2015+.x64 [>= 14.40.33816.0]
(1/2) Found Microsoft Edge WebView2 Runtime [Microsoft.EdgeWebView2Runtime] Version 131.0.2903.86
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/7a700eba-24af-452b-88f1-7625cf472b9b/MicrosoftEdgeWebView2RuntimeInstallerX64.exe
  ██████████████████████████████   173 MB /  173 MB
Successfully verified installer hash
Starting package install...
Installer failed with exit code: 2147747880

The latter seems to be related to #192036

Steps to reproduce
  1. Open elevated prompt
  2. Run winget install -e --id MartiCliment.UniGetUI (elevated), you get the error The installer cannot be run from an administrator context.
  3. Open an unprivileged prompt
  4. Re-run winget install -e --id MartiCliment.UniGetUI (unprivileged)
Actual behavior
>winget install -e --id MartiCliment.UniGetUI
Found UniGetUI (formerly WingetUI) [MartiCliment.UniGetUI] Version 3.1.3
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
This package requires the following dependencies:
  - Packages
      Microsoft.EdgeWebView2Runtime [>= 129.0.2792.89]
      Microsoft.VCRedist.2015+.x64 [>= 14.40.33816.0]
(1/2) Found Microsoft Edge WebView2 Runtime [Microsoft.EdgeWebView2Runtime] Version 131.0.2903.86
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/7a700eba-24af-452b-88f1-7625cf472b9b/MicrosoftEdgeWebView2RuntimeInstallerX64.exe
  ██████████████████████████████   173 MB /  173 MB
Successfully verified installer hash
Starting package install...
Installer failed with exit code: 2147747880
Expected behavior

I expected the installation to succeed. Alternatively I would have expected winget to "drop" elevation when invoking an installer that explicitly doesn't want to run this way.

The latter can be achieved by locally setting the variable __compat_layer to RunAsInvoker. See here and here (I'm the author). To the best of my knowledge both the variable name and its value are case-insensitive.

Environment
winget --info
Windows Package Manager v1.9.25200
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.26100.2605
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.24.25200.0

Winget Directories
-----------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag…
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett…
Portable Links Directory (User)    %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root              C:\Program Files\WinGet\Packages
Portable Package Root (x86)        C:\Program Files (x86)\WinGet\Packages
Installer Downloads                %USERPROFILE%\Downloads

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

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled
ProxyCommandLineOptions                   Disabled
DefaultProxy                              Disabled
Screenshots and Logs

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the two winget install -e --id MartiCliment.UniGetUI commands with the reported winget --info environment, then inspect the behavior discussed in #192036. The issue names no repository file or test; done would mean the package installs successfully or the elevation behavior is explicitly resolved.

Written by the indexing model from the issue text.

Assessment

Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.