Administrator Protection: machine-scope installs are not matched across the user and the elevated account

Đang mở
#6,688 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
49/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp
Lĩnh vực
backend, cli

Hướng nghiên cứu

Start by tracing how winget list and winget upgrade match installed packages to catalog entries across the normal and elevated account profiles; the issue names no source files or tests. Compare the matching behavior for machine-wide installers with the unaffected portable package. Done means machine-wide packages are matched consistently from both accounts and can be upgraded from either.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Command-List Command-Upgrade Issue-Bug Needs-Triage
Relevant area(s)

WinGet CLI

Relevant command(s)

winget list, winget upgrade

Brief description of your issue

With Administrator Protection on, an elevated winget runs as the separate account ADMIN_, with its own profile and so its own tracking catalog. A machine-wide package installed from one account is matched to its winget package only in that account. The other account lists it as an unmatched ARP entry, and its winget upgrade never offers the update. My scheduled upgrade runs elevated, so Ruby 3.4 stayed on an old version for weeks.

Steps to reproduce
  1. Turn on Administrator Protection (TypeOfAdminApprovalMode = 2).
  2. Install a machine-wide package from a normal terminal, for example winget install --id RubyInstallerTeam.Ruby.3.4 (the installer elevates itself).
  3. Run winget list in a normal terminal and in an elevated terminal, and compare.
  4. When a newer version is published, run winget upgrade in both.
Expected behavior

A machine-wide package is matched the same way from both accounts, so either one can upgrade it.

Actual behavior

Normal terminal:

Ruby 3.4                                  RubyInstallerTeam.Ruby.3.4        3.4.12-1-arm    winget
Windows Software Development Kit - ...    Microsoft.WindowsSDK.10.0.26100   > 10.0.26100.7705 winget

Elevated terminal:

Ruby 3.4                                  ARP\Machine\X86\RubyInstaller-3.4-aarch64-mingw-ucrt_is1  3.4.12-1-arm
Windows Software Development Kit - ...    ARP\Machine\X86\{45e335f3-c807-43b8-9ed1-43666cfcf939}    10.1.26100.9457

Before I updated it by hand, the normal winget upgrade listed Ruby 3.4.11-1 -> 3.4.12-1, while the elevated one reported "No installed package found" for it. A portable package is not affected: zoxide installed from the elevated account showed up as winget-matched in the normal account too.

Environment
Windows Package Manager v1.29.380
Windows: Windows.Desktop v10.0.26300.9974
System Architecture: Arm64
Package: Microsoft.DesktopAppInstaller v1.29.380.0
Administrator Protection: on (TypeOfAdminApprovalMode = 2)
Ngôn ngữ chính
C++
Star
26.6k
Fork
1.8k
Merge trung bình
3 ngày 10 giờ
Pull request đã merge (30 ngày)
41

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/winget-cli

Tất cả issue của microsoft/winget-cli

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.