microsoft / microsoft/winget-cli
Package install UAC prompt is minimized when using WinGet COM API
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Description of the new feature / enhancement
COM API for installing a package that requires elevation prompts a UAC that is minimized in the taskbar which can possibly be missed by the user.
Code used for this issue:
// winget search "Microsoft.DotNet.SDK.Preview"
var filter = _factory.CreatePackageMatchFilter();
filter.Option = PackageFieldMatchOption.ContainsCaseInsensitive;
filter.Field = PackageMatchField.CatalogDefault;
filter.Value = "Microsoft.DotNet.SDK.Preview";
findOptions.Selectors.Add(filter);
var match = _connectResult.PackageCatalog.FindPackages(findOptions);
// winget install {catalog package} --silent
var package = match.Matches[0].CatalogPackage;
var options = _factory.CreateInstallOptions();
options.PackageInstallMode = PackageInstallMode.Silent;
_pm.InstallPackageAsync(package, options).GetAwaiter().GetResult();
Proposed technical implementation details
Option to full-screen the UAC prompt or provide an API to set the parent window of the UAC dialog.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the COM API flow shown, especially CreateInstallOptions and InstallPackageAsync after package discovery. Trace how the elevated installation invokes the UAC prompt and determine whether the proposed full-screen behavior or parent-window API is feasible. Done means an elevated prompt is reliably visible or the API exposes the requested parent-window control.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, csharp
- Domain
- api, operating-systems, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100