Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 tasks done
exoosh opened this issue Dec 12, 2024 · 1 comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.

Comments

@exoosh
Copy link
Contributor

exoosh commented Dec 12, 2024

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

@exoosh exoosh added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Dec 12, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage This work item needs to be triaged by a member of the core team. label Dec 12, 2024
@Trenly
Copy link
Contributor

Trenly commented Dec 13, 2024

@denelon - If I'm not mistaken, this belongs over at CLI

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Triage This work item needs to be triaged by a member of the core team. label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

No branches or pull requests

2 participants