ElevationRequirement for specific InstallModes
Description of the new feature / enhancement
We've spotted a issue where Silent sometimes requires Administrator where SilentWithProgress does not, therefore we need a way to set the ElevationRequirement per InstallMode.
Affected Packages
- https://github.com/microsoft/winget-pkgs/pull/56369
- https://github.com/microsoft/winget-pkgs/pull/28914
Proposed technical implementation details
I don't know of a clean way of implementing it into the Schema
I don't know of a clean way of implementing it into the Schema
I've thought a little on this -
ElevationRequirement:
Silent: <>
SilentWithProgress: <>
Interactive: <>
To avoid this being a breaking change, the existing standard would have to be retained and just interpreted as if it applies to all the fields.
ElevationRequirement: <>
I figure these would do the trick -
"ElevationRequirementLevel": {
"type": [
"string",
"null"
],
"enum": [
"elevationRequired",
"elevationProhibited",
"elevatesSelf"
],
"description": "The installer's elevation requirement"
}
"ElevationRequirement": {
"oneOf": [
{
"$ref": "#/definitions/ElevationRequirementLevel"
},
{
"type": [
"object",
"null"
],
"properties": {
"Silent": {
"$ref": "#/definitions/ElevationRequirementLevel"
},
"SilentWithProgress": {
"$ref": "#/definitions/ElevationRequirementLevel"
},
"Interactive": {
"$ref": "#/definitions/ElevationRequirementLevel"
},
}
}
],
"description": "The installer's elevation requirement"
}
How about making winget elevating when install,uninstall,upgrade commands are run
How about making winget elevating when install,uninstall,upgrade commands are run
Why would they do that, that would break installers which prohibits elevation and winget would not work for users without administrator privileges.