chocolatey / chocolatey/choco

Do not require elevation for informative functions for Admin in non-admin shell

Open
#1,307 34 comments 1 reaction 0 assignees View on GitHub
0 - Triaging CoreTeam Documentation Enhancement
Dominant language
C#
Stars
11.5k
Forks
960
PR merge metrics
No merged PRs in 30d

Description

Since version 0.10.4 choco by default "Run with highestAvailable Execution Level by default". This can be disabled via manifest.

However, its ideal for this to be dynamic. The elevation should happen on install, update or uninstall and not on list, info, version and other informative or config functions.

I propose the very easy method to fix this: by changing the `cinst`, `cup` and `cuninst` wrappers to switch to `higestAvailable` level and restore it back after the run, so that user can set manifest to `asInvoker`. The non-wrapped commands would still elevate (or not, as per settings) on each command, but users will have an option this way.

With this in place it could be considered to set defaults to asInvoker.

Contributor guide

Open the contributing guide

Research direction

Start with the cinst, cup, and cuninst wrappers and the manifest elevation setting described in the issue. Trace how informative functions such as list, info, and version differ from install, update, and uninstall. Done means informative or config commands can run without elevation while installation changes still follow the configured elevation behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
cli, operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.