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]: Spotify.Spotify Supports Machine-Scope Installation (But WinGet Doesn't Realize) #210448

Open
2 tasks done
AdreKiseque opened this issue Jan 10, 2025 · 4 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage This work item needs to be triaged by a member of the core team.

Comments

@AdreKiseque
Copy link

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

I just recently found out that Spotify, a package notorious (I guess?) for not working out of elevated sessions, actually supports machine-scope installation, which does work when run as administrator. However, WinGet not only doesn't recognize this with the --scope parameter, but also prevents one from manually using it with --override due to the elevationProhibited flag on the package.
Spotify will normally refuse to install from an administrator context (for some reason), but if the wizard is called with the arguments /extract "C:\Program Files\Spotify", it will work.

Steps to reproduce

Open an elevated shell
winget install Spotify.Spotify
(See that it fails—"The installer cannot be run from an administrator context.")
winget install Spotify.Spotify --scope machine
(See that it fails—"No applicable installer found; see logs for more details.")
winget install Spotify.Spotify --override '/extract "C:\Program Files"'
(See that it fails—"The installer cannot be run from an administrator context.")
winget download Spotify.Spotify
&<Path to downloaded installer> /extract "C:\Program Files\Spotify
(See that it works from the elevated shell)

Actual behavior

WinGet does not recognize a valid package with the --scope machine flag, nor does it allow users to manually use the arguments for admin-friendly machine-scope installation, preëmptively blocking the wizard on the belief it cannot be run from an administrator context.

Expected behavior

WinGet should recognize the machine-scope installation option and also not block users from doing it manually.

Environment

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

Screenshots and Logs

No response

@AdreKiseque AdreKiseque added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Jan 10, 2025
@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 Jan 10, 2025
@AdreKiseque
Copy link
Author

Also to note: Spotify can't be installed at machine-scope with --override either, since it requires admin perms to do that...

@SpecterShell
Copy link
Contributor

The installer supports extraction doesn't mean it would support machine-scope installation. When the installer is running in extraction mode, it does not add shortcuts, register file associations, and mostly importantly, write Apps And Features (ARP) entry to the registry (so WinGet can detect updates for Spotify) compared to normal installation.

It is more like a portable installation to a fixed directory, and the counterpart manifest in Scoop is using this method for installation.

@AdreKiseque
Copy link
Author

Ah, I see! Thanks for clearing that up, makes a bit more sense now. Still, I'd argue being unable to make use of this option still constitutes a bug or flaw of some kind, no?

@Dragon1573
Copy link
Contributor

Image

Currently, the ElevationRequirement: elevationProhibited will block validation in Windows Sandbox instance, since:

  • The automatic generated account WDAGUtilityAccount is the only administrator inside instance.
  • A set of automatic generated PowerShell script will be executed with an elevated, administrator-privileged shell session.

I think this package might be able to install in a privileged session with removing the limitation of ElevationRequirement, but keep explicitly setting Scope: user.

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. Needs-Triage This work item needs to be triaged by a member of the core team.
Projects
None yet
Development

No branches or pull requests

3 participants