microsoft / microsoft/winget-cli

Winget pin add (AppID) --blocking fails to prevent app upgrade when scripts runs as SYSTEM

Open
#4,333 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-User-Interface Context-System Issue-Docs
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Brief description of your issue

As the title says, a few of my apps I did NOT want to be upgraded still got upgraded by "winget upgrade --all" even tho I had run "winget pin add (AppID) --blocking", this command's success was confirmed by "winget pin list" command, they all got pinned by "blocking".

Steps to reproduce

Run winget pin add (AppID) --blocking
run a winget upgrade --all script as SYSTEM
look at the log file: it will say, for example, that PowerISO got upgraded even tho I made sure to block it by the aforementioned commands and the list showed the block

Expected behavior

Winget pin add (AppID) --blocking should completely prevent any version upgrades whatsoever.

Actual behavior

Winget pin add (AppID) --blocking does NOT prevent ALL app versions from being upgraded

Environment
Windows Package Manager v1.7.10861
Windows: Windows.Desktop v10.0.22631.3374
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.22.10861.0

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 with the winget pin add (AppID) --blocking, winget pin list, and winget upgrade --all entry points, reproducing the upgrade script under SYSTEM on the reported Windows and WinGet versions. Compare the pin state with the upgrade log; done means a blocking pin prevents the pinned application from upgrading when the command runs as SYSTEM.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.