Hi,
winget is a new tool from microsoft which acts as a package manager like apt, zypper or yum.
Installing winget (latest version on 26.01.2021 is 0.2.3162 Preview)
Download Microsoft.VCLibs.140.00_14.0.29231.0_x64__8wekyb3d8bbwe.appx, Microsoft.VCLibs.140.00.UWPDesktop_14.0.29231.0_x64__8wekyb3d8bbwe.appx and the latest release of winget
1 2 3 | PS D:\> Add-AppxPackage .\Microsoft.VCLibs.140.00_14.0.29231.0_x64__8wekyb3d8bbwe.appx PS D:\> Add-AppxPackage .\Microsoft.VCLibs.140.00.UWPDesktop_14.0.29231.0_x64__8wekyb3d8bbwe.appx PS D:\> Add-AppxPackage .\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.appxbundle |
Open a command shell (cmd.exe) or powershell
To search for an application use
1 | PS D:\> winget search python |
List all versions of an application
1 2 3 4 | PS D:\> winget search python Name ID Version ------------------------------------------------------------------ Python Python.Python 3.9.1 |
Install a package
1 2 3 4 5 6 7 8 | PS D:\> winget show python --versions FoundPython [Python.Python] Version ------- 3.9.1 3.9.0 3.8.7 3.8.6 |
Install the latest version of a package
1 | PS D:\> winget install python |
Or in a specific version.
1 | PS D:\> winget install python -v 3.8.6 |
This starts the installer in foreground. If you want to perform a silent installation add the –silent switch
1 | PS D:\> winget install python -v 3.8.6 --silent |
In the current release the upgrade and (installed) list commands are marked as experimental. You must enable it if you want to use it
1 2 3 4 5 6 | PS D:\> winget features Function State Property ----------------------------------------------------- Microsoft Store Support disabled experimentalMSStore List Command disabled list Upgrade Command disabled upgrade |
To enable experimental features you must create a settings.json file. Simply call
1 | PS D:\> winget settings |
and open it with an editor of your choice(if no additional editor is installed use notepad). This creates a file
C:\Users\%UserName%\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Possible settings can be found here.
So add
"experimentalFeatures": {
"experimentalCmd": true,
"experimentalArg": true
},
to the settings.json. Then this looks like
{
"$schema": "https://aka.ms/winget-settings.schema.json",
"experimentalFeatures": {
"list": true,
"upgrade": true
},
}
and the experimental features are enabled
1 2 3 4 5 6 7 8 9 10 11 | PS D:\> winget install show source search list upgrade hash validate settings features |
To list all installed applications
1 | PS D:\> winget list |
to be continued…
Michael