microsoft / microsoft/winget-cli

Run as admin to avoid UAC spam?

Open
#2,999 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Feature
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Description of the new feature / enhancement

I reinstalled my PC's Windows 10 as part of my annual PC and digital cleaning. This time around, I exported my winget packages and stored it alongside my Windows 10 installer, allowing me to, immediately after getting into the desktop, re-install all my 96 packages.

My first attempt was to run winget import pkgs.json, but was surprised to read that winget does not like running from within an admin shell. So I had to sift through an astounding amount of UAC prompts, which certainly sucked.

This is why I would like to request a feature to winget to allow importing - or even upgrading - from an elevated shell to avoid UAC spam.

Thanks!

Proposed technical implementation details

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the winget import and upgrade command entry points and how they handle elevated versus non-elevated shells. Review the existing UAC behavior and related command tests, if present. Done means importing or upgrading from an elevated shell no longer produces unnecessary repeated UAC prompts while preserving the existing behavior for normal shells.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
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.