-
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
Add ability to specify --scope
to winget upgrade
#2145
Comments
The existing flag would be --scope not --context. Not sure if consistency would be prefered or avoiding confusion would be prefered. Personally i prefer consistency 🤷🏼♂️ |
I agree, |
winget upgrade
--scope
to winget upgrade
Also very useful if the scope is shown when listing. I.e. provide the functionality for added column with scope. # Adding scope column in output
winget list --scope
# only showing items with machine scope
winget list --scope machine |
[Policy] Command-Upgrade |
Sorry, I don't understand your answer/comment. |
I was simply applying a label |
What is supposed to happen in this scenario? Should winget install the user version of Teams (alongside the outdated system-wide one)? What's the current behavior when a program is installed in both scopes, and `winget upgrade --id is run? |
Teams system wide installer is, at least used to be, a special one. It installs Teams in user context for all users that log in on that device and don't have Teams installed already. Thus in this scenario I'm pretty sure using WinGet to update Teams in user context would woek just fine. |
Okay, you should've probably specified that in the issue because that's definitely not common knowledge or how most programs behave. Most programs, when installed with a system-wide installer, are installed system-wide, i.e. in Program Files, not just for all users. So my question still stands. |
Description of the new feature / enhancement
Add a switch for scope/context with
winget upgrade
, both for listing upgrades (specifying no apps), and when upgrading a specific app.Example use case
List upgradeable apps
winget upgrade --scope user
winget upgrade --scope machine
Upgrade app
Teams is installed with the system wide MSI installer, but user without admin permissions wants to upgrade Teams in user context.
winget upgrade --exact --id Microsoft.Teams --scope user
A user without admin permissions wants to upgrade all user context apps.
winget upgrade --all --scope user
Proposed technical implementation details
Detection rules should say something about scope/context. So should the manifest too.
Edit 221221
--context
to--scope
for consistency withwinget install
.The text was updated successfully, but these errors were encountered: