microsoft / microsoft/winget-cli

Packaged COM Cannot Be Used from Elevated Context

Open
#6,042 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-COM-API Issue-Bug PowerShell
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Relevant area(s)

COM API, PowerShell Module

Relevant command(s)

No response

Brief description of your issue

When using the COM API (or the PowerShell Module that uses it under the hood), if the calling context is elevated the call will fail as the elevated context does not see the COM registration.

Steps to reproduce

Call a winget powershell cmdlet from an elevated PowerShell instance.

Expected behavior

API calls to succeed

Actual behavior

API call fails

Environment
Windows: Windows.Desktop v10.0.26564.1000
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.28.190.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 by reproducing the failure with a winget PowerShell cmdlet from an elevated PowerShell instance, then investigate the COM API and PowerShell Module areas named in the issue. Confirm how COM registration is exposed to the elevated context. Done means the API calls succeed when invoked from an elevated context on the reported Windows environment.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.