Microsoft finally anounced a package manager called “winget” (long: “Windows Package Manager Client”) for Windows 10 last year. Since keeping Software up-to-date is really troublesome on Windows, this tool directly from Microsoft is really welcome.

So i gave it a try today. Please be aware that winget is still in Preview / not stable yet.

First I had to enable two experimental features to test the upgrade command:

> winget settings 

In the editor add the “experimentalFeatures” part in the config JSON:

{ 
    "$schema": "https://aka.ms/winget-settings.schema.json", 
    // For documentation on these settings, see: https://aka.ms/winget-settings 
    // "source": { 
    //    "autoUpdateIntervalInMinutes": 5 
    // }, 
    "experimentalFeatures": { 
        "upgrade": true, 
        "list": true 
    }, 
} 

First lets fetch the most recent package repository informations:

> winget source update

So lets list the upgradeable packages:

> winget upgrade 

Name       ID                   Version Verfügbar Quelle 
-------------------------------------------------------- 
PowerShell Microsoft.PowerShell 7.0.3.0 7.1.3     winget 

Not many results (there was quite some outdated software on this Windows 10 installation). Also according to some entries in the Github issues, Microsoft still seems to work on the matching of the installed software to the entries in the repository.

Anyhow, I tried to update Powershell 7:

> winget upgrade --all 

Gefunden PowerShell [Microsoft.PowerShell] 
Diese Anwendung wird von ihrem Besitzer an Sie lizenziert. 
Microsoft ist nicht verantwortlich und erteilt keine Lizenzen für Pakete von Drittanbietern. 
Downloading https://github.com/PowerShell/PowerShell/releases/download/v7.1.3/PowerShell-7.1.3-win-x64.msi 
██████████████████████████████  95.0 MB / 95.0 MB 
Der Installer-Hash wurde erfolgreich überprüft 
Paketinstallation wird gestartet... 
Erfolgreich installiert 

But, surprise, that didn’t work - Powershell 7 was not updated allthough there was an installation running. Not sure what went wrong here.

On another Windows installation I tried with “Windows Terminal” (from Microsoft Store), that worked fine.

So i tried to update some outdated software by just installing it manually with winget. Examples:

> winget install IrfanView 

Gefunden IrfanView [IrfanSkiljan.IrfanView] 
Diese Anwendung wird von ihrem Besitzer an Sie lizenziert. 
Microsoft ist nicht verantwortlich und erteilt keine Lizenzen für Pakete von Drittanbietern. 
Downloading http://www.storage.programosy.pl/iview457_x64_setup.exe 
██████████████████████████████  3.56 MB / 3.56 MB 
Der Installer-Hash wurde erfolgreich überprüft 
Paketinstallation wird gestartet... 
Erfolgreich installiert 
 
> winget install GoogleChrome 
> winget install LibreOffice 
> winget install OpenVPN
> winget install PowerShell 
> winget install AdobeReader 

That worked fine, with one exception: Adobe Reader was not the most recent version that has been downloaded (the repository seems to need an update). This is also an negative side effect of a package manager like this: If the repository is not up to date, the software also won’t be. But that should work out better, if also software vendors take care that new releases are updated in the repository.

If you want to find out which installable packages are in the repository you can use:

> winget show 

That gives you a long list of package names.

So, as soon as Microsoft releases a stable version, including the upgrade feature, we can use a script like the following to automatically update all supported software versions:

winget source update 
winget upgrade 
winget upgrade --all --silent 
pause 

You can name it “update.bat” and put it into your users autostart directory (best use Windows + R shell:startup for that).

Have fun!


Some links:

Alternatives to winget (only Open Source):