You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 19, 2019. It is now read-only.
Helpers such as Install-ChocolateyEnvironmentVariable are able to perform their work in per-user or per-machine (all users) scope. The latter is generally preferred (so that the installed package is correctly registered for all users), but requires administrative privileges.
If a package wants to support both per-machine (when running with administrative privileges) and per-user installations, it currently needs to explicitly handle both cases in code, e.g.:
if (Test-ProcessAdminRights) {
Install-ChocolateyPath -pathType Machine ...
} else {
Install-ChocolateyPath -pathType User ...
}
If a package does not specify the scope, User is assumed, which is inconvenient now that per-machine, administrative installation is the secure and recommended approach.
Let's add an "Auto" scope parameter value, which would be interpreted as Machine if user has administrative privileges and as User otherwise. This should also be the default scope, so that the amount of code required in typical packages is minimized.
The text was updated successfully, but these errors were encountered:
Helpers such as
Install-ChocolateyEnvironmentVariable
are able to perform their work in per-user or per-machine (all users) scope. The latter is generally preferred (so that the installed package is correctly registered for all users), but requires administrative privileges.If a package wants to support both per-machine (when running with administrative privileges) and per-user installations, it currently needs to explicitly handle both cases in code, e.g.:
If a package does not specify the scope, User is assumed, which is inconvenient now that per-machine, administrative installation is the secure and recommended approach.
Let's add an "Auto" scope parameter value, which would be interpreted as Machine if user has administrative privileges and as User otherwise. This should also be the default scope, so that the amount of code required in typical packages is minimized.
The text was updated successfully, but these errors were encountered: