Skip to content

Conversation

JohnMcPMS
Copy link
Member

@JohnMcPMS JohnMcPMS commented Jul 17, 2025

Fixes #4410

Change

Catch errors coming from FindProvisionedPackages and ignore them. This is most likely to happen when the caller is not elevated.

Validation

> winget install notepad++.notepad++ --scope machine
Failed to open the predefined source; please report to winget maintainers.
An unexpected error occurred while executing the command:
0x80070005 : Access is denied.

> wingetdev install notepad++.notepad++ --scope machine
Found Notepad++ [Notepad++.Notepad++] Version 8.8.3
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v8.8.3/npp.8.8.3.Installer.x64.exe
  ██████████████████████████████  6.52 MB / 6.52 MB
Successfully verified installer hash
Starting package install...
Microsoft Reviewers: Open in CodeFlow

@JohnMcPMS JohnMcPMS merged commit c84f06c into microsoft:master Jul 21, 2025
9 checks passed
@JohnMcPMS JohnMcPMS deleted the try-catch branch July 21, 2025 17:27
@jantari
Copy link

jantari commented Jul 26, 2025

You are saving this project, tyvm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Access denied error when using --scope machine on standard user
3 participants