-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Spotify.Spotify does not install or update if winget is running in admin mode #1452
Comments
This should be moved to microsoft/winget-cli I think (it can be moved, you don't need to recreate it), but once the changes for #1284 are implemented in the client (the schema changes were added in #1427, specifically here), this should be able to be done. Hypothetically we'll be able to say |
Thanks for your reply! If someone with the right permissions can move it to the other repository, that would be great.
I feel like if I'm the administrator, I should be able to do whatever I want... :) |
@bshoshany we've been working on the schema to support this scenario. @jedieaston is calling out the new changes to the schema. As soon as the client can honor this request, we should be able to resolve this issue. |
@denelon great, thanks for letting me know! |
Also looking forward to a fix. |
+1 for the request. This would be a total game changer. |
We've discussed unintended consequences of killing processes. It's not worth the risk to make this a default behavior. We may consider that as a "power user" feature, but today, we don't have a reliable mechanism to know which process or processes are running and what else might break for a user. |
Interesting. Could it be perhaps work as an optional switch? |
Something like that would be the "power user" option, but we still need to know what process or processes to kill. It reminds me of the good old days with "kill -9". |
? |
Some packages install services and an executable to interact with them. We would need to be enlightened about any processes related to the package. In the case of someone running a plugin for say "OBS Studio" they might be unhappy if they were to run upgrade on OBS Studio and kill some long encoding session they were running from another package that was leveraging it. That's the main kind of reason we are avoiding it. If we enrich the manifest to include information about all processes, it could be technically possible to kill them, but we don't have anything like that in the manifest today. The other thing we've seen are silent installers that aren't quite smart enough to explicitly stop the program, but the interactive installer mode is. |
I agree with @Trenly and I've confirmed the manifest now includes elevationProhibited. |
This is still a problem: ❯ winget install Spotify.Spotify
The installer cannot be run from an administrator context. powershell version 7.3.3 |
Run the install command in a standard powershell terminal, and not one that was run as administrator |
@Trenly I just reread the original ticket text here just to make sure I am not crazy. Isn't the whole point of this issue that this is not correct behavior, when all other packages deal with admin privileges just fine? Your last couple of comments seem to indicate some feature that was added to resolve this rather than closing of ticket with "won't fix"? |
The Spotify installer itself prohibits being run in an administrative context, it isnt something that WinGet has control over. Its also not an accurate statement to say that all other packages deal with admin priveleges correctly because I know there are packages that require admin to install but only install to a user context. Just because Spotify is the first example of applications requiring they be run in the user context and not an admin context doesn’t mean other installers don’t also have the same requirement. The feature already existed to indicate which contexts an installer allows - elevatesSelf, elevationRequired, and elevationProhibited. My previous comments were stating that the installer requirement of elevationProhibited was added to the manifest at winget-pkgs so that the user is informed about the elevation requirement when a Spotify install is requested from an admin context instead of causing the breaking prompt |
Ok, the nuance of how a breaking prompt compares to some other refusal error message and how that's what the final adopted fix was about is not super obvious. To reword what you said - winget has added a feature that allows for more granular/graceful control over how privilege checks are performed for packages like this, but it is now up to the managers of particular packages (like Spotify) to make use of it to result in sensible and non-frustrating behavior. Does that sound about right? Probably worth adding determined to not be a bug as described by original reporter somewhere in here for other mortals that come wandering in. |
I have a similar issue when I try to install Spotify via Intune in user context. `********************** Transcript started, output file is C:\Users\florianObradovic\AppData\Local_MEM\Log\Spotify.Spotify-install.log Windows PowerShell transcript end |
I'm not sure I understand, what's the point of this change? The installation still fails all the same. Why not use the flag to have WinGet install the package without elevation as needed, instead of just spitting an error and moving on? |
Create issues related to the winget.exe client here
Brief description of your issue
I run
winget upgrade --all
to upgrade all packages automatically at startup. This has to be run in administrator mode, otherwise I need to manually click "Yes" in User Account Control for every single package that gets updated. However, when winget attempts to upgrade Spotify, the installer complains that it has to be installed using a normal account instead of an Administrator account (see screenshot). This not only means that it won't update, it also means it will stop the automated update at startup since I have to click "OK" in the dialog box before winget can continue.Steps to reproduce
winget upgrade spotify
Note that if Spotify is not already installed, then it also cannot be installed for the first time from admin mode:
winget install spotify
Expected behavior
Spotify should install or upgrade in admin mode.
Actual behavior
Spotify does not install or upgrade in admin mode.
Environment
Suggestions for solution
The text was updated successfully, but these errors were encountered: