microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
22.5k stars 1.39k forks source link

WinGetDownload E_ACCESSDENIED #4518

Closed msftrubengu closed 3 weeks ago

msftrubengu commented 3 weeks ago

Fix issue when calling WinGetDownload from Az Functions.

It is most likely caused by an attempt to create the directory while reading the admin settings. Instead of failing, catch the exception and use the default settings.

If we ever read more settings from WinGetUtil a more robust solution is required.

Microsoft Reviewers: Open in CodeFlow