Description of the new feature / enhancement
Several packages have been reported to not properly handle "--scope".
The most likely reasons are due to the installer determining scope based on whether the process is elevated, or the user is a member of the local Administrators group.
One example is Git.Git reported at twitter by @woodyinwoodley
The 2.40.1 manifest is specifying an "inno" installer, but it doesn't appear to support the /CURRENTUSER or /ALLUSERS switch.
The manifest does have entries for both "user" and "machine", but those keys don't actually drive the intended behavior.
The default behavior in the installer checks to see if the user is a member of the local Administrators group to determine if the installer will be installed machine wide or per user.
; Note that we write the Registry values below either to HKLM or to HKCU depending on whether the user running the installer
; is a member of the local Administrators group or not (see the "Check" argument).
; Install under HKEY_LOCAL_MACHINE if an administrator is installing.
https://github.com/git-for-windows/build-extra/blob/6fe3f63731fb39e20f7a668fd54566514ecc83af/installer/install.iss#L214
; Install under HKEY_CURRENT_USER if a non-administrator is installing
https://github.com/git-for-windows/build-extra/blob/6fe3f63731fb39e20f7a668fd54566514ecc83af/installer/install.iss#L221
Proposed technical implementation details
We could add another YAML key to indicate that the scope arguments either aren't properly supported, or we could attempt to provide some kind of error messaging to help users understand why their request can't be honored by WinGet.
We could potentially also check to see if the user is in the local Administrator group to determine what output to display.
Description of the new feature / enhancement
Several packages have been reported to not properly handle "--scope".
The most likely reasons are due to the installer determining scope based on whether the process is elevated, or the user is a member of the local Administrators group.
One example is Git.Git reported at twitter by @woodyinwoodley
The 2.40.1 manifest is specifying an "inno" installer, but it doesn't appear to support the /CURRENTUSER or /ALLUSERS switch.
The manifest does have entries for both "user" and "machine", but those keys don't actually drive the intended behavior.
The default behavior in the installer checks to see if the user is a member of the local Administrators group to determine if the installer will be installed machine wide or per user.
https://github.com/git-for-windows/build-extra/blob/6fe3f63731fb39e20f7a668fd54566514ecc83af/installer/install.iss#L214
https://github.com/git-for-windows/build-extra/blob/6fe3f63731fb39e20f7a668fd54566514ecc83af/installer/install.iss#L221
Proposed technical implementation details
We could add another YAML key to indicate that the scope arguments either aren't properly supported, or we could attempt to provide some kind of error messaging to help users understand why their request can't be honored by WinGet.
We could potentially also check to see if the user is in the local Administrator group to determine what output to display.