Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability for winget to download a Microsoft Store application for specific Windows build #4996

Open
Vahlblue opened this issue Nov 21, 2024 · 1 comment
Labels
Command-Download Issue related to WinGet Download Issue-Feature This is a feature request for the Windows Package Manager client. msstore Issue related to "msstore" REST source

Comments

@Vahlblue
Copy link

Vahlblue commented Nov 21, 2024

Description of the new feature / enhancement

I would like to have the possibility to download Microsoft Store application for a specific version. Since by default, winget always downloads the latest version even if incompatible. This disallows to download LPX since one need to download the matching version. Also, for older version of Windows (LTSC) you can stumble upon incompatible application version.

This solves #4995.

The problem

For example, for Microsoft.LanguageExperiencePackfr-FR (9NHMG4BJKMDG): each build has its version with the [build].a.b.c format. The last for 24H2 is 26100.22.41.0 and for Windows 10 21H2/22H2 the last is 19041.79.263.0. However, Winget only download 27754.1.2.0, for the future 25H2. Its manifest confirm it is not compatible with our Windows versions.
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.27547.0" MaxVersionTested="10.0.27754.1000" />
Another example with Microsoft.Windows.Photos (9WZDNCRFJBH4) : for the Windows 10 1809 (LTSC), build 17763, the latest compatible is 2023.10030.27002.0. The last version compatible with this build in Winget downloaded version is 2019.19061.18920.0.

Example solution

I would see for an example of solution the use of the "-v" flag in winget. For now, it is not used for Store downloads.
winget download 9NHMG4BJKMDG -v 22000
This would download the Windows 11 22H2 French LPX.

Another possibility is to make a filter with the platform name -v "Windows.Desktop=22000".

Technical implementation details

This would be easily technically implementable without any infrastructure change, only code. Winget calls two API:

The first call is done here MSStoreDownload.cpp and the other here SFSClientImpl.cpp.

Given these APIs winget already have all information at hands. It has all versions but Winget only choose the latest version and ignore the others. It just has to implement a best version for given build algorithm. This algorithm would have to be implemented in these two files.

Thanks, and have a nice day

@Vahlblue Vahlblue added the Issue-Feature This is a feature request for the Windows Package Manager client. label Nov 21, 2024
Copy link

We've found some similar issues:

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Nov 21, 2024
@denelon denelon added msstore Issue related to "msstore" REST source Command-Download Issue related to WinGet Download and removed Needs-Triage Issue need to be triaged labels Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Command-Download Issue related to WinGet Download Issue-Feature This is a feature request for the Windows Package Manager client. msstore Issue related to "msstore" REST source
Projects
None yet
Development

No branches or pull requests

2 participants