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.07k stars 1.43k forks source link

Using command `winget upgrade --all` does not update some software and does not say why. #2493

Open SuperPat45 opened 2 years ago

SuperPat45 commented 2 years ago

Brief description of your issue

Using command winget upgrade --all does not update some software and does not say why.

I can see in the log the real reason :

Installer [X64,wix,Machine,] not applicable: Installed package type 'exe' is not compatible with installer type wix, or with accepted type(s) wix

Steps to reproduce

winget upgrade --all
Nom                    ID                       Version Disponible Source
-------------------------------------------------------------------------
MiKTeX                 ChristianSchenk.MiKTeX   22.3    22.7       winget
Password Safe (64-bit) RonyShapiro.PasswordSafe 3.58.0  3.59.0     winget
2 des mises à niveau sont disponibles.

Expected behavior

It must update all these softwares or say why it can't. I think wget should provide a command to reinstall the software in this case.

Actual behavior

Somme's software are skipped without any visible explanation.

Environment

Windows: Windows.Desktop v10.0.19044.1889
Architecture du système: X64
Package: Microsoft.DesktopAppInstaller v1.18.2091.
rp1231 commented 2 years ago

For me the same thing happens for these packages:

winget upgrade
Name                                             Id                                Version          Available    Source
-----------------------------------------------------------------------------------------------------------------------
Microsoft Windows Desktop Runtime - 5.0.17 (x86) Microsoft.DotNet.DesktopRuntime.6 < 6.0.5          6.0.8        winget
Microsoft Windows Desktop Runtime - 3.1.28 (x86) Microsoft.DotNet.DesktopRuntime.6 < 6.0.5          6.0.8        winget
Windows Software Development Kit - Windows 10.0… Microsoft.WindowsSDK              < 10.0.22000.832 10.0.22621.1 winget
Microsoft .NET SDK 5.0.408 (x64)                 Microsoft.DotNet.SDK.6            < 6.0.105        6.0.400      winget
Windows Software Development Kit - Windows 10.0… Microsoft.WindowsSDK              < 10.0.22000.832 10.0.22621.1 winget
Microsoft .NET SDK 6.0.108 (x64)                 Microsoft.DotNet.SDK.6            6.0.108          6.0.400      winget
MIDI-OX                                          JamieOConnell.MIDI-OX             7.02.372         7.02.373     winget
Microsoft .NET SDK 6.0.303 (x64)                 Microsoft.DotNet.SDK.6            6.0.303          6.0.400      winget
Microsoft Windows Desktop Runtime - 3.1.23 (x64) Microsoft.DotNet.DesktopRuntime.6 < 6.0.5          6.0.8        winget
Windows Software Development Kit - Windows 10.0… Microsoft.WindowsSDK              10.0.22000.832   10.0.22621.1 winget
Microsoft .NET SDK 6.0.203 (x64)                 Microsoft.DotNet.SDK.6            6.0.203          6.0.400      winget
11 upgrades available.
4 packages have version numbers that cannot be determined. Using "--include-unknown" may show more results.

They just show up again after being upgraded.

I'm on windows 11 x64

denelon commented 2 years ago

Many of these packages support "side-by-side" installation. If you run winget list you are likely to see more than one version present. We're working on enhancements to the upgrade flow to check and see if the latest version is already installed on the system to avoid displaying them again.

rp1231 commented 2 years ago

@denelon That doesn't appear to be the case. For eg. the MIDI-OX application has only one version installed i.e.: v7.02.372 (There is no side-by-side version installed, I copied the output of winget list to notepad++ and did a text search for "MIDI-OX" and it showed only one version installed) After I run the winget upgrade upgrade --all command, It shows that it is updating it to v7.02.373, But when I run winget list after the upgrade, It shows the older version number, which means that it's not getting upgraded at all.

denelon commented 2 years ago

@rp1231 it may be a bug in the installer. What version does it display when you go to Windows Apps & Features? The version that is displayed by winget is the value in the registry reported by the installer.

rp1231 commented 2 years ago

@denelon It shows v7.02.372 which is the older version in Windows Apps & Features.

denelon commented 2 years ago

That means that either it did an upgrade and didn't change the value, or there is a bug and it's not reporting the latest version correctly. It's also possible that the manifest is reporting the version incorrectly.


PackageIdentifier: JamieOConnell.MIDI-OX
PackageVersion: 7.02.373
MinimumOSVersion: 10.0.0.0
InstallerType: exe
Scope: machine
InstallerSwitches:
  Silent: /auto /args="/quiet /norestart"
  SilentWithProgress: /auto /args="/passive /norestart"
Installers:
- Architecture: x86
  InstallerUrl: http://www.midiox.com/zip/midioxse.exe
  InstallerSha256: 16469593531764AEEDA2FDE8819B894B76243E233FD009D732193DAA9DB72385
```YAML
rp1231 commented 2 years ago

Yes it seems that the manifest has it incorrectly reported as the official download link from the site matches the one in the manifest. The latest version is .372 when installed from the site.

But I face this problem with all of these apps:

winget upgrade
Name                                             Id                                Version          Available    Source
-----------------------------------------------------------------------------------------------------------------------
Microsoft Windows Desktop Runtime - 5.0.17 (x86) Microsoft.DotNet.DesktopRuntime.6 < 6.0.5          6.0.8        winget
Microsoft Windows Desktop Runtime - 3.1.28 (x86) Microsoft.DotNet.DesktopRuntime.6 < 6.0.5          6.0.8        winget
Windows Software Development Kit - Windows 10.0… Microsoft.WindowsSDK              < 10.0.22000.832 10.0.22621.1 winget
Microsoft .NET SDK 5.0.408 (x64)                 Microsoft.DotNet.SDK.6            < 6.0.105        6.0.400      winget
Windows Software Development Kit - Windows 10.0… Microsoft.WindowsSDK              < 10.0.22000.832 10.0.22621.1 winget
Microsoft .NET SDK 6.0.108 (x64)                 Microsoft.DotNet.SDK.6            6.0.108          6.0.400      winget
MIDI-OX                                          JamieOConnell.MIDI-OX             7.02.372         7.02.373     winget
Microsoft .NET SDK 6.0.303 (x64)                 Microsoft.DotNet.SDK.6            6.0.303          6.0.400      winget
Microsoft Windows Desktop Runtime - 3.1.23 (x64) Microsoft.DotNet.DesktopRuntime.6 < 6.0.5          6.0.8        winget
Windows Software Development Kit - Windows 10.0… Microsoft.WindowsSDK              10.0.22000.832   10.0.22621.1 winget
Microsoft .NET SDK 6.0.203 (x64)                 Microsoft.DotNet.SDK.6            6.0.203          6.0.400      winget
11 upgrades available.
4 packages have version numbers that cannot be determined. Using "--include-unknown" may show more results.

I haven't checked each one of these individually, so it might be the side by side problem for them or the manifest problem, idk.

rp1231 commented 2 years ago

Any solution to dealing with an incorrect manifest file? Or maybe the developer hasn't uploaded the correct file in the download location?

denelon commented 2 years ago

Any solution to dealing with an incorrect manifest file? Or maybe the developer hasn't uploaded the correct file in the download location?

@Trenly are you familiar with MIDI-OX? I'm not sure if the manifest is incorrect, or if the installer has a different version than the package.

Trenly commented 2 years ago

Any solution to dealing with an incorrect manifest file? Or maybe the developer hasn't uploaded the correct file in the download location?

@Trenly are you familiar with MIDI-OX? I'm not sure if the manifest is incorrect, or if the installer has a different version than the package.

I'll take a look in a bit

denelon commented 2 years ago

It looks like a vanity URL so it might be any number of things that changed.

Trenly commented 2 years ago

It looks like a vanity URL so it might be any number of things that changed.

It looks like a typo in the manifest, where 373 was used instead of 372. I've opened microsoft/winget-pkgs#78888 to fix the package, and also updated it to use the Marketing Version, with ARP Mapping.

rp1231 commented 2 years ago

@denelon I'm encountering a slightly different problem with the latest version of the blender app. The programs and features shows version 3.3.0 which is the latest version, but for some reason winget detects it as 3.2.2 Commenting here as it seems related and didn't seem deserving of a new thread.

denelon commented 2 years ago

@rp1231 take a look in Windows Apps & Features. If you look below the "name" of the package, you will see what version that package is reporting. That's the version we use for comparison during "upgrade". If the manifest has a different "packageVersion" from the "displayVersion" in the "AppsAndFeatures" section of the manifest, then a "marketing version" would be displayed to the user.

https://devblogs.microsoft.com/commandline/windows-package-manager-1-3/#new-version-reporting will explain a bit more with an example image.

rp1231 commented 2 years ago

I'm not sure I understand all that completely. Just wanted to report it...... I guess it's showing the marketing version in winget then......

rp1231 commented 2 years ago

Ok, so I had blender 3.2.2 installed previously, Then I used winget to upgrade it to 3.3.0

But now when I list the installed packages this turns up:

winget.exe list --name blender
Name    Id                        Version Available Source
----------------------------------------------------------
blender BlenderFoundation.Blender 3.3.0             winget
blender BlenderFoundation.Blender 3.2.2   3.3.0     winget

It shows two blender versions installed now. But when I search in the add or remove programs, It shows only the 3.3.0 version.

How do I get rid of the second entry (3.2.2) ?

@denelon

denelon commented 2 years ago

Does winget uninstall BlenderFoundation.Blender --version 3.2.2 work? I'm wondering if their installer isn't cleaning up the old entries. We may need to add "uninstallPrevious" to the manifest to get the desired behavior.

rp1231 commented 2 years ago

@denelon Nope, I get this:

winget.exe uninstall BlenderFoundation.Blender --version 3.2.2
No installed package found matching input criteria.

But when I typed the winget.exe list --name blender command, It listed both the versions again.

denelon commented 2 years ago

That means there are still registry entries for 3.2.2, but the package may not be present if you don't see it in Windows Apps & Features. This may require a manual removal.

rp1231 commented 2 years ago

Removing it from the registry worked. Thanks.

But I found that the files for the previous version were still present, so I had to delete the files manually as well.

Does winget uninstall BlenderFoundation.Blender --version 3.2.2 work? I'm wondering if their installer isn't cleaning up the old entries. We may need to add "uninstallPrevious" to the manifest to get the desired behavior.

I guess the installer isn't cleaning up the files or the entries in this case atleast.....

denelon commented 2 years ago

I'm glad that worked! I hope this helps others too. It might be worth asking them if they are aware and would be willing to improve their customer experience.

ChristianBeier commented 2 years ago

I saw same behavior with Microsoft.azure-iot-explorer several times. winget upgrade listed the new available version and winget upgrade --all ignored the package. In the first place I removed the package to install the new version. Today I first tried winget upgrade --id Microsoft.azure-iot-explorer what responded with "No applicable update found". Afterwards I just did an winget install --id Microsoft.azure-iot-explorer what installed the new version and the old one was removed as expected.

YacineBoussoufa commented 1 year ago

Noticed the same issues with some of my packages.

Nome                            Id               Versione     Disponibile  Origine
----------------------------------------------------------------------------------
MiKTeX                          MiKTeX.MiKTeX    22.8.28      22.10        winget
Webex                           Cisco.WebexTeams 42.8.0.23281 42.9.0.23494 winget
Teams Machine-Wide Installer    Microsoft.Teams  1.5.0.8070   1.5.00.28361 winget
Dokan Library 1.4.1.1000 Bundle dokan-dev.Dokany 1.4.1.1000   2.0.6.1000   winget
4 aggiornamenti disponibili.

After checking, winget says that my Webex version is 42.8.0.23281 and I can upgrade to 42.9.0.23494, however after checking in the app it says that my version is 42.10.0.23814, two version ahead of what winget thinks my version is... Same thing happens with Teams, it says I'm at version 1.5.0.8070 and I can go to 1.5.00.28361, but mine is already at 1.5.00.21463...

Trenly commented 1 year ago

[Policy] Command-Upgrade [Policy] Area-Output

TLCPlusPlus commented 1 year ago

Many of these packages support "side-by-side" installation. If you run winget list you are likely to see more than one version present. We're working on enhancements to the upgrade flow to check and see if the latest version is already installed on the system to avoid displaying them again.

That worked, thank you.

Turns out I had two installs of "Microsoft.DotNet.DesktopRuntime.7" and Powershell (9MZ1SNWT0N5D and Microsoft.PowerShell). Removing both and reinstalling one of the Microsoft.DotNet.DesktopRuntime.7 and Microsoft.Powershell fixed the issue.

trueqbit commented 4 weeks ago

@mdanish-kh suggested adding the AppsAndFeatures > InstallerType entry to set the nested installer type for the FireDaemon OpenSSL package, which had the same problem.