Winget detecting Steam app ShareX
Brief description of your issue
Running winget upgrade --all --include-unknown lists ShareX.ShareX as an installed app even though it is installed via Steam, resulting in an error.
> winget upgrade --all --include-unknown
Name Id Version Available Source
---------------------------------------------
ShareX ShareX.ShareX Unknown 16.1.0 winget
1 upgrades available.
(1/1) Found ShareX [ShareX.ShareX] Version 16.1.0
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Successfully verified installer hash
Starting package install...
Installer failed with exit code: 1
Installer log is available at: C:\Users\me\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir\WinGet-ShareX.ShareX.16.1.0-2024-09-20-21-26-45.499.log
Steps to reproduce
- Install ShareX via Steam
- Run
winget upgrade --all --include-unknown, watch it send an error about ShareX
Expected behavior
I expected it to not be detected by winget as it is installed by Steam.
Actual behavior
Winget is detecting ShareX as an application even though it is installed from Steam and giving an error when using the command.
Environment
❯ winget --info
Windows Package Manager v1.8.1911
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.22631.4169
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.23.1911.0
Winget Directories
-----------------------------------------------------------------------------------------------------------------------
Logs %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag…
User Settings %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett…
Portable Links Directory (User) %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User) %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root C:\Program Files\WinGet\Packages
Portable Package Root (x86) C:\Program Files (x86)\WinGet\Packages
Installer Downloads %USERPROFILE%\Downloads
Links
---------------------------------------------------------------------------
Privacy Statement https://aka.ms/winget-privacy
License Agreement https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale
Admin Setting State
--------------------------------------------------
LocalManifestFiles Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride Disabled
LocalArchiveMalwareScanOverride Disabled
ProxyCommandLineOptions Disabled
DefaultProxy Disabled
I used Steam to install ShareX
I don't think it should be detecting this as Steam already updates those apps, so there is no point. I understand winget is meant to detect already installed applications, but I don't think it makes sense to detect Steam apps.
The package manager operates by downloading a compressed copy of the manifests in its repo, then matching this data against data in the Registry, and outputting matches. This package might have 1 installer that is installed through various package managers and maybe other means. Were this the case, then the Registry would receive the same data regardless of install source, and the package manager should offer the upgrade.
Does upgrading through this package manager cause issues for other package managers including Steam? (Consider using a VM or Sandbox to test instead of modifying your system.)
One possible solution could be using the --pin feature, to prevent this package manager from offering upgrades for this package in the future.
Looking at the ARP on my machine, it seems that apps installed by Steam all have a product code like "Steam App [numerical ID]". So we could potentially detect that an app is managed by Steam and ignore them for updates. I think it would be worth doing since we probably can't do anything useful with those apps (except maybe list).
I think florelis solution would be perfect. It makes no sense to just list them as they are pretty much useless since you can't update them or anything.
In the meantime, maybe "winget pin" feature could be used as a workaround to block updating ShareX in upgrade all scenario.