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
23.25k stars 1.45k forks source link

WinGet Download presents error when it should be a warning. #4643

Closed KevinLaMS closed 1 month ago

KevinLaMS commented 3 months ago

Brief description of your issue

When downloading a store app, the user is presented with the following if they do not have admin access to the license.

Failed to retrieve Microsoft Store package license An unexpected error occurred while executing the command: 0x80190193 : Forbidden (403).

Given this is targeting a user or ITPro. For the user, they can run the app and the license will come down from the store. Therefore not an error. For the ITPro, they can pass in the --skip-license to avoid this case.

Steps to reproduce

winget download 9WZDNCRFJ3PZ -d c:\temp\deleteme\9WZDNCRFJ3PZ

Expected behavior

To be told the package was successfully installed and not error.

Actual behavior

Failed to retrieve Microsoft Store package license An unexpected error occurred while executing the command: 0x80190193 : Forbidden (403).

Environment

Windows Package Manager (Preview) v1.9.1792-preview
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.26255.5000
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.24.1792.0
CyrilShi commented 3 months ago

I have the same issue , but it seems not affect to download completed.

denelon commented 3 months ago

You can use "--skip-license" to avoid downloading the license file. It's only necessary if the intended use is for "offline" installation on another host that isn't able to connect to the licensing server.