WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: spl on April 19, 2024, 12:12:04 PM

Title: Winget Anyone?
Post by: spl on April 19, 2024, 12:12:04 PM
Seems a nice app to track updates for Windows packages. Probably not worth the effort to automate the CLI in WB, but I have a one-liner to obtain packages with available updates which can be dropped into the CLR stdout function I uploaded. Kicks out a csv.
Title: Re: Winget Anyone?
Post by: spl on April 20, 2024, 08:10:04 AM
I also discovered Microsoft keeps a SQLite database for Winget at this url https://winget.azureedge.net/cache/source.msix - if you rename the downloaded .msix to .zip. You can then extract index.db from the \public folder. It has 20 tables and with a bit of SQL you can join them to come up with a way to query packages for updates.

Nice to see an SQLite db put to good use
Title: Re: Winget Anyone?
Post by: td on April 20, 2024, 09:51:24 AM
Sometimes MFST engineering-driven development diverges from (sneaks past) MSFT marketing-driven development.
Title: Re: Winget Anyone?
Post by: spl on April 20, 2024, 02:30:38 PM
It took some thought but I cam up with a useful script which I shared with 2 old buddies who have multiple users they support, and wanted a winget display in Excel.

Used PS since it has a winget module that is pretty slick. I started WB code based on redirecting from command line, i.e. winget list > c:\temp\wingetpkgs.txt

Looked space delimited and I applied the mapping technique I posted on an recent thread about parsing space-delimited data. It sorta worked, but failed when trying to convert to Excel. And doubt there is any real interest here. But I'm enjoying leaning new things.

By the way: No more imoji's????

Title: Re: Winget Anyone?
Post by: spl on April 21, 2024, 06:38:37 AM
I made at least 2 people happy. Compiled as exe. All of their 'clients' have either Win10 or Win11, so accessing winget is not an issue. They just want to keep track of who has what. And they can't complain because it was free.