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

Upgrade Microsoft Store apps with winget upgrade #2854

Open
felipecrs opened this issue Jan 14, 2023 · 16 comments
Open

Upgrade Microsoft Store apps with winget upgrade #2854

felipecrs opened this issue Jan 14, 2023 · 16 comments
Labels
Issue-Feature This is a feature request for the Windows Package Manager client. msstore Issue related to "msstore" REST source

Comments

@felipecrs
Copy link
Contributor

Description of the new feature / enhancement

I have some strange habit of turning on my computer then running winget upgrade --all as the first thing to ensure I'm up-to-date.

However, that isn't enough. I have to go to Windows Update settings, and check and install updates from there. Although this has nothing to do with WinGet, I use PSWindowsUpdate for the task. It works great.

Then, I have to open Microsoft Store, head the installed apps list, click in Update, and hope that it works.

Now, I'm wondering... if WinGet can install Microsoft Store apps, why shouldn't it be able to update them?

It would be so cool!

And I think I'm not the only one looking for something like it, when I Google Update microsoft store apps from powershell, there are plenty of people asking for some solution while none exist so far, it seems.

And I'm sorry if this is a duplicate, I searched for existing issues before opening.

Proposed technical implementation details

I'll leave that up to you, but I'd say that this should probably come enabled by default when running winget upgrade, including --all, the same way msstore is enabled by default when running winget install.

Maybe I could use winget upgrade --all -s winget or winget upgrade --all -s msstore to filter out if I need?

@felipecrs felipecrs added the Issue-Feature This is a feature request for the Windows Package Manager client. label Jan 14, 2023
@ghost ghost added the Needs-Triage Issue need to be triaged label Jan 14, 2023
@stephengillie stephengillie removed the Needs-Triage Issue need to be triaged label Jan 16, 2023
@denelon
Copy link
Contributor

denelon commented Jan 17, 2023

It's related to the version information from the Microsoft Store. Most packages are reporting version "Unknown" in the manifest. Some of the newer Win32 Apps in the store do have version information in winget show output, but not the endpoint being used to check for newer versions. The work is in progress. The traditional Microsoft Store apps still show "Unknown". Once the version information is available, WinGet will be able to upgrade them.

@denelon denelon added the msstore Issue related to "msstore" REST source label Jan 17, 2023
@denelon
Copy link
Contributor

denelon commented Jan 18, 2023

I forgot to add. If you use WinGet to install a package from the "msstore" source, it is linked in winget list. If you run winget upgrade --all you get prompted about "unknown versions" if you run winget upgrade --all --include-unknown the packages with unknown versions will be included. It may be a "duplicate" install of the same version, but if a newer one is present, it will get upgraded.

Note, if the source also displays "unknown" it will not upgrade "unknown" to "unknown". You would have to use "--force" to force an upgrade.

https://www.edtittel.com/blog/winget-upgrade-include-unknown-gets-ilustrated.html

@felipecrs
Copy link
Contributor Author

Oh, that's interesting!

@felipecrs
Copy link
Contributor Author

felipecrs commented Feb 17, 2023

In the mean time, I am using a PowerShell script which I found somewhere in the internet:

Get-CimInstance -Namespace "Root\cimv2\mdm\dmmap" -ClassName "MDM_EnterpriseModernAppManagement_AppManagement01" | Invoke-CimMethod -MethodName UpdateScanMethod

It does the same thing as clicking in the Get updates button in the Microsoft Store.

(sending because it may be useful for someone else)

@jazzdelightsme
Copy link
Member

@felipecrs I assume that WMI/MDM thing does not work if you don't have Intune, right?

FYI: It is possible to write some script code to programmatically (and synchronously) trigger Store updates: #1738 (reply in thread)

@felipecrs
Copy link
Contributor Author

Yes it works, I use it on my personal computers without Intune or anything special preinstalled.

@bogdan-patraucean
Copy link

It's related to the version information from the Microsoft Store. Most packages are reporting version "Unknown" in the manifest. Some of the newer Win32 Apps in the store do have version information in winget show output, but not the endpoint being used to check for newer versions. The work is in progress. The traditional Microsoft Store apps still show "Unknown". Once the version information is available, WinGet will be able to upgrade them.

"Most packages are reporting version "Unknown" in the manifest" - this is happening even if the version is specified in the manifest, I hope this will be fixed soon

@Hlsgs
Copy link

Hlsgs commented May 16, 2023

@denelon
+1 for winget upgrade --all -s <source>

I am aware that not even winget list -s msstore is working properly as of now, but when versioning gets settled winget upgrade --all -s msstore would be a godsend for admins. Extra credit if it updates the store app itself as well.

@C1rdec
Copy link

C1rdec commented Jul 13, 2023

Is there any update? As a ms-store app developer I would love to detect and trigger updates with winget.

@luxzg
Copy link

luxzg commented Dec 19, 2023

I'm wondering about status of this as well. While I don't run update first thing on logon, every once in a while I do the update routine. I have a script that runs everything in the Terminal, but also opens Win Update and MSStore so I can click the buttons there just in case, as some stuff just refuses to pull updates sometimes. So for me it's running single ps1 script, click 2 buttons and wait.

But I would still imagine a perfect world where single winget command updates everything (like apt would do for Debian/Ubuntu).

And while I'm not much of a programmer, more sysadmin crossing to project manager, hearing "excuse" that package has no version number makes me start considering if I should pull my hair (little I have left) or just fire the guy that said it (with all due respect).

Isn't Microsoft Store made by Microsoft? With all APIs and functionality? And isn't winget an MS project included in same OS as MSStore? So MS Store knows what to update when you click "Get Updates" (though that can also get confused). But different MS team can't query same API and get the list of what's new and update? So you don't have version numbers. So what. You have some other information, same one that "Get Updates" uses.

So, again, sorry for harsh words, you people have been doing great work on winget, but ... Please don't say (publicly) that you can't fetch new updates for Store apps because version info is missing.

Option 1)
Use the existing Store mechanic, whichever that may be

Option 2)
Force Store team to force version numbering for any new app uploads/releases as of "yesterday". Android and Apple have been forcing very specific versioning requirements onto developers for like ... forever (? haven't been doing that for 3 years+). If MS still doesn't force versions, just change that already.

I am looking at winget to eventually replace any GUI installing on Windows, for admins of all kinds to rejoice in easy app management (in 2025? 2027?). But please don't just throw excuses around for things that are managed by same parent company.

(And I know MS is large corporation, and how it may be difficult to discuss stuff with other teams and departments, but come on... Try?)

Thanks!

@Delphi251189
Copy link

Hi all!
It's about one year while this issue is opened. Any news???

@m-fessler
Copy link

+1 for the feature of detecting version (instead of unkown) of msstore apps
+1 for the feature that optionally only msstore apps can be updated "--all -s msstore"

Is there a current roadmap?

@soredake
Copy link

soredake commented Jan 8, 2024

If this will be implemented, please do not update apps which set UpdateWhileInUse to defer like windows terminal https://github.com/microsoft/terminal/pull/16250/files#diff-e86b4433a9c131fdd5229882b8df6f1005eccfc9be4f128eee05185b7e0f7821R37

@tecxx
Copy link

tecxx commented Jan 17, 2024

In the mean time, I am using a PowerShell script which I found somewhere in the internet:

Get-CimInstance -Namespace "Root\cimv2\mdm\dmmap" -ClassName "MDM_EnterpriseModernAppManagement_AppManagement01" | Invoke-CimMethod -MethodName UpdateScanMethod

It does the same thing as clicking in the Get updates button in the Microsoft Store.

(sending because it may be useful for someone else)

this does not execute for a user without local admin rights

@strixdio
Copy link

strixdio commented Apr 3, 2024

Has there been any update with this?

@shockogit
Copy link

I'm wondering about status of this as well. While I don't run update first thing on logon, every once in a while I do the update routine. I have a script that runs everything in the Terminal, but also opens Win Update and MSStore so I can click the buttons there just in case, as some stuff just refuses to pull updates sometimes. So for me it's running single ps1 script, click 2 buttons and wait.

But I would still imagine a perfect world where single winget command updates everything (like apt would do for Debian/Ubuntu).

And while I'm not much of a programmer, more sysadmin crossing to project manager, hearing "excuse" that package has no version number makes me start considering if I should pull my hair (little I have left) or just fire the guy that said it (with all due respect).

Isn't Microsoft Store made by Microsoft? With all APIs and functionality? And isn't winget an MS project included in same OS as MSStore? So MS Store knows what to update when you click "Get Updates" (though that can also get confused). But different MS team can't query same API and get the list of what's new and update? So you don't have version numbers. So what. You have some other information, same one that "Get Updates" uses.

So, again, sorry for harsh words, you people have been doing great work on winget, but ... Please don't say (publicly) that you can't fetch new updates for Store apps because version info is missing.

Option 1) Use the existing Store mechanic, whichever that may be

Option 2) Force Store team to force version numbering for any new app uploads/releases as of "yesterday". Android and Apple have been forcing very specific versioning requirements onto developers for like ... forever (? haven't been doing that for 3 years+). If MS still doesn't force versions, just change that already.

I am looking at winget to eventually replace any GUI installing on Windows, for admins of all kinds to rejoice in easy app management (in 2025? 2027?). But please don't just throw excuses around for things that are managed by same parent company.

(And I know MS is large corporation, and how it may be difficult to discuss stuff with other teams and departments, but come on... Try?)

Thanks!

I could not agree with this more. I'm a huge MS fan and enterprise user. WSL was a huge leap, then Windows terminal then winget. All of a sudden Windows 10/11 feel like knowledge worker and dev machines all in one. Except ..... package management is still an issue in 2024. Why is it so hard to get this to converge?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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