Updating programs and Windows components using Winget

JCitron

Trainzing since 12-2003
Our systems usually tell us when OS components need updating but many programs do not unless we check our installs and go through the website or are prompted when we start them. Following the Unix and Linux world, Microsoft has finally caught on to something very useful. By using the PowerShell winget command, applications and Windows software that's not normally updated unless we check can be updated somewhat easily.

To use the winget command, you need to open a command prompt using Admin rights.

Right-click on the start-button icon and click on Terminal (Admin).
Confirm you want to do this when prompted by clicking OK.

At the command line, type in winget list update and press enter.

A screen something like this will appear:

Code:
Name                                                       Id                          Version      Available    Source
-----------------------------------------------------------------------------------------------------------------------
Microsoft Visual C++ 2013 Redistributable (x64) - 12.0.30… Microsoft.VCRedist.2013.x64 12.0.30501.0 12.0.40664.0 winget
Microsoft Visual C++ 2013 Redistributable (x86) - 12.0.40… Microsoft.VCRedist.2013.x86 12.0.40660.0 12.0.40664.0 winget
Python Launcher                                            Python.Launcher             < 3.12.0     3.12.0       winget
Microsoft Visual C++ 2013 Redistributable (x64) - 12.0.40… Microsoft.VCRedist.2013.x64 12.0.40660.0 12.0.40664.0 winget
Microsoft Visual C++ 2013 Redistributable (x86) - 12.0.30… Microsoft.VCRedist.2013.x86 12.0.30501.0 12.0.40664.0 winget
6 upgrades available.

The following packages have an upgrade available, but require explicit targeting for upgrade:
Name    Id              Version  Available Source
-------------------------------------------------
Discord Discord.Discord 1.0.9030 1.0.9035  winget

A list will show what the system thinks can be updated this way. Most things can but there are some that can't such as the Discord application.

To update an item from the list, you type Winget update application Id found in the middle column like this:

winget update Microsoft.VCRedist.2015+x64 and press enter. (The ones listed above don't have an available update but are shown anyway. The 2015+ version had an update earlier.)

The process runs and a progress bar appears. For some applications, the regular Windows install wizard appears while others are updated silently.

Using the up-arrow on the keyboard, the command history can be edited and the program name can be changed to update that program.

Once done, close the window by clicking on the X.

I recommend rebooting afterwards if needed.

There are other command options to use but these are the ones I use for now.

Why did I use this command initially?
I was repairing an issue on my brother's laptop and a tech website recommended updating some programs this way. Now I use it all the time for all my systems.
 
It will be interesting to hear how other Window users get on with this. The only thing I have on a Windows machine is TRS19 and at times I've not trusted N3V to update that and certainly not Microsoft.

It works in Linux because whoever creates the distribution ensure that individual updates do not have any adverse effect on other elements of the distribution before it is published as an update to that distribution, and the same goes for any software installed via their respective software library. However I have downloaded and installed software not included in such libraries including their respective repositories which have caused issue when updating. I read recently that someone, and I think it may be Canonical themselves, are building a version of Ubuntu which comprises only Flatpak application where everything is sandboxed and running in its own space so as not to effect other applications.

The other issue with Windows software is trust. Its good for years, for example CCleaner, then out of the blue it has another program loaded along side an update, or has reset all your preferences feeding back usage data and so forth.

Interesting one John, thank you.

Peter
 
Last edited:
I didn't find anything to update but I install Windows updates regularly and had a couple in the last few days. Plus I updated Visual Studio recently and that probably updated some obscure libraries. Discord seems to update itself most every day but I suspect those are more related to promoting their paid features/addons.
 
It will be interesting to hear how other Window users get on with this. The only thing I have on a Windows machine is TRS19 and at times I've not trusted N3V to update that and certainly not Microsoft.

It works in Linux because whoever creates the distribution ensure that individual updates do not have any adverse effect on other elements of the distribution before it is published as an update to that distribution, and the same goes for any software installed via their respective software library. However I have downloaded and installed software not included in such libraries including their respective repositories which have caused issue when updating. I read recently that someone, and I think it may be Canonical themselves, are building a version of Ubuntu which comprises only Flatpak application where everything is sandboxed and running in its own space so as not to effect other applications.

The other issue with Windows software is trust. Its good for years, for example CCleaner, then out of the blue it has another program loaded along side an update, or has reset all your preferences feeding back usage data and so forth.

Interesting one John, thank you.

Peter
Microsoft, to give the devil his due, has gotten better with the software packaging but there are still mess ups. They do supply updated libraries to active developers who subscribe to their developer network, and many developers do develop and package updates in advance of new OS versions unlike the olden days where we've been caught without updated drivers or software not working due to an OS update. The platform too has pretty much settled down too with new versions based on previous ones. The fact that current Windows versions are based on Windows NT, makes a big difference as well since NT was built for stability. I can vouch for NT4 SP6a being quite stable. I ran that on multiple servers for about a decade and had zero OS-related crashes. I only rebooted the machines when I needed to update software or had to take them down for other maintenance, but other than that they ran full bore for a decade.

I agree getting caught by options being reset is annoying. I've been lucky with that so far, but that doesn't mean I'm going to be free of that. I've seen that in the past being caused by conflicts with settings.

I have never seen any Trainz versions on the list for updates using this method which is fine by me as well.

For the very reasons you mentioned, I no longer use CC Cleaner. When Piriform was bought out, the quality and purpose of their software diminished as they did the very thing they were supposed to be preventing.
 
I didn't find anything to update but I install Windows updates regularly and had a couple in the last few days. Plus I updated Visual Studio recently and that probably updated some obscure libraries. Discord seems to update itself most every day but I suspect those are more related to promoting their paid features/addons.
I check about once a month for software updates using this method. I agree you had already updated your software when you updated Visual Studio.
 
The problem with command line interfaces is that typos can be deadly. I once accidentally reformatted an entire disk because I typed a "0" instead of a "1" and there was no confirmation step. It was that event that taught me the importance of making backups.😭

I will wait until an app version of the winget program, with check boxes, radio buttons, drop down menus, a "help" option, etc becomes available before I will use it.
 
The problem with command line interfaces is that typos can be deadly. I once accidentally reformatted an entire disk because I typed a "0" instead of a "1" and there was no confirmation step. It was that event that taught me the importance of making backups.😭

I will wait until an app version of the winget program, with check boxes, radio buttons, drop down menus, a "help" option, etc becomes available before I will use it.
It's a lot more fool-proof these days. In the olden days, a lot of things happened without feedback. I remember selecting the wrong hard drive too when we had to select the drive and low-level initialize it using Debug.

With winget, like other PowerShell commands, you are given a syntax error back. typing the command followed by help, or some variant such as --help will give the various command switches to make it work.
 
Life was much simpler with MS-DOS 2.11.
It sure was. That's when I started with DOS as well. Prior to that I was using CP/M-Plus (CP/M 3.0) and transitioning between the two. It was easy to overwrite files back then and I got the syntax of the pip command mixed up with copy.
PIP <destination> <source> versus Copy <source> <destination>.

You can imagine the outcome of that!
 
Back
Top