[BUG] Winget Detection does not work, however it is still listed in fastfetch -h packages-format
Read the FAQ first
- [x] I have checked the FAQ but the issue is not covered
Description
Winget Detection does not work. this is likely due to winget being overall a very slow package manager.
winget's list command is super slow and outputs unreliable results, you cannot rely on that.
in my fetch, i found a solution, winget looks in these registry keys for its packages: "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall*", "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall*", "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall*" these registry keys seem to be overall more reliable than winget's list command.
note: this includes apps NOT installed through winget directly, however theyre technically installed through winget if they are there note2: while they are not always gotten through winget directly, winget's list command also shows them, and also sometimes has weird formatting.
Version used
fastfetch 2.65.2 (x86_64)
Bug prevalence
Always
Regression
Not sure
Installation
Package manager
Package manager
winget
Screenshots
No response
Configuration
System information
not relevant, winget is not in all.jsonc
Features built-in
threads
vulkan
imagemagick7
chafa
zlib
opencl
libzfs
Embedded wcwidth
WinRT headers
Windows 8.1 Compatibility
Lua 5.5
QuickJS 0.15.1
Winget is disabled by default, and can be enabled in config file with
{
"general": {
"processingTimeout": 999999
},
"modules": [
{
"type": "packages",
"disabled": []
}
]
}
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall*", "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall*", "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall*"
They contain a lot of garbages. I don't want to change the current logic before I clearly understand how winget handles that.
oh, alright winget does have a lot of unpredictable data and it barely keeps track of what it installs itself vs what it generically found
while reading through winget documentation stuff, i figured out a way to find a SQLite database which logs installed winget stuff, its in %LOCALAPPDATA\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Microsoft.Winget.Source_8wekyb3d8bbwe\installed.db thats what winget uses when you search winget list --source winget, so that could be what fastfetch would use rather than querying winget directly
SQL please?
wdym? im not super experienced with SQL stuff, it should be documented since winget-cli is OSS (https://github.com/microsoft/winget-cli/tree/master)
Hi! I'd like to work on this issue.
I've read through the discussion and understand the concerns about relying on winget list due to its performance and inconsistent output. I also saw the suggestion about using the installed.db SQLite database and the request for more details.
I'm going to investigate the current package detection implementation, inspect the installed.db schema used by Winget, and evaluate whether it can be integrated without introducing unnecessary complexity or dependencies. If the approach looks suitable, I'll share my findings and open a PR.
If someone is already actively working on this issue, please let me know so I don't duplicate the effort.
I dont think anyone is working on it.
Is this still being worked upon at all?
i don't think so, there's been no commits mentioning it