Elevation where the user does not have administrative access #5871
markembling
started this conversation in
Configuration
Replies: 1 comment
-
|
This would be a feature request, and it likely isn't just WinGet that would need to be able to support a different account for elevation. There are probably some other OS primitives that would need to exist for something like this to work. I'd also expect some edge cases to show up for packages being installed for the current user that require an "NT Service" (which requies elevation to install). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm not sure whether what I'm dealing with here is a bug, expected behaviour, or somewhere in the middle, so I'm starting this simply as a question with the hope that someone will know the answer and have perhaps a better idea of what this issue actually is.
I have a
.wingetfile which wants to install both user-scoped application packages, and Visual Studio 2022 which uses thesecurityContext: elevateddirective to specify that admin elevation is required. However this doesn't actually work and I end up with output similar to the following:I think the reason for this is because the environment it is being used in is one where the primary user account is not an administrator and therefore it makes sense that it cannot elevate. I have a separate user account used for administrative operations (such as manually running the VS installer/modification process). But obviously this is a separate account.
It seems like WinGet cannot trigger a UAC prompt which can elevate as a different user (prompting for admin username/password). I also cannot (or more accurately, do not want to) run the entire
wingetprocess as that admin user, as then all the user-scoped packages in the file will be installed for that user, rather than my regular account.I guess my question is whether there's anything I can do to mitigate this, or whether this is a feature request (i.e. can winget do this in future). Or really anything else I should know, consider, or look into?
Beta Was this translation helpful? Give feedback.
All reactions