winget The Windows Command Line Package Manager
In this video I look at the use of the new Windows Command Line Package Manager winget for Windows 11 which can be used to install, upgrade and uninstall software via the Windows Terminal.
Microsoft have had silent installers for a while but these required you to manually download the installer from the vendors website and then open the terminal, then navigate to the downloads folder and then install the application using a variety of silent switches. With all the complications above they were rarely used.
More recently, Microsoft have acquired GitHub, an online software repository used for code development, with version control. GitHub code is commonly deployed on Linux using the inbuilt package manager apt or apt-get (the advanced package tool) and the Software store in Linux typically carries out the same operation displaying a Graphical User Interface (GUI).
For the Python ecosystem, the Package Managers conda or older pip (Python install package) are used to download and install Python libraries and modules stored on a GitHub repository.
winget is Microsoft's Package Manager for Windows 11. To use winget, make sure your Microsoft Store is up to date, in particular App Installer.
To use winget, right click the start button and select Windows Terminal (Admin).
Type in:
winget
This will give you a list of command arguments such as:
list
search
upgrade
install
uninstall
When we type:
winget list
We will get a list of all the software installed on our machine. it has 5 columns; the App Name, App Id (SoftwareVendor.AppName), Version, Available Version (on GitHub/winget servers, only displayed if a newer version is available) and Source (only useful if the source is winget).
In my case, I seen that there is a newer version of Windows Terminal Available which has the App Id Microsoft.WindowsTerminal, and I can use the upgrade argument followed by the AppID to upgrade to the latest version:
winget upgrade Microsoft.WindowsTerminal
The search argument can be used to search for software using part of the vendors name or software name without any spaces. This is a clean install of Windows 11 Pro on a Dell XPS 9305 and I still need to install Dell Command Update. I can search for it using the search term Dell (lower or uppercase):
winget search dell
From the list shown, I can see that the AppID is Dell.CommandUpdate and I can use the install argument alongside the AppID to install Dell Command Update:
winget install Dell.CommandUpdate
After installing numerous software packages for example:
winget install Google.Chrome
winget install 7zip.7zip
winget install TheDocumentFoundation.LibreOffice
winget install Notepad++.Notepad++
winget install Anaconda.Anaconda3
winget install ArduinoSA.IDE.beta
winget install Microsoft.VisualStudio.2022.Community
I can use the argument upgrade without any AppID to view only a list of software packages that have an upgrade available on winget:
winget upgrade
To upgrade all of these, I can use the flag --all opposed to manually specifying an AppID:
winget upgrade --all
To uninstall a software package, for example LibreOffice, I can use the uninstall argument followed by the App ID in this case TheDocumentFoundation.LibreOffice:
winget uninstall TheDocumentFoundation.LibreOffice
The install option has a number of options but they are at the moment quite limited. For the Anaconda Individual Edition for example, it is installed for All Users (Found in C:\ProgramData\Anaconda3), opposed to a Single User (%UserProfile%\Anaconda3) and there is no option to Add Anaconda to my PATH environment variable during installation. For Visual Studio 2022 Community Edition, there is no option to setup a Development Environment for example for the Programming Language C++ during installation.
So far most of the software available on winget is either open source, free to use for individual use or developed by Microsoft. This means it can be installed without the hassles of Product Activation. Microsoft Software such as Microsoft Visual Studio 2022 Community Edition can normally be Registered/Activated by use of a Microsoft Account. One of the system requirements for Windows 11 is the Trusted Platform Module (TPM) 2.0 which can be thought as a unique serial key embedded in your systems UEFI BIOS. In the near future, Microsoft will likely build an API which uses this alongside an API for Microsoft Account login to entice Commercial Software vendors to license and add their Commercial Software Suites for Windows 11 using winget. Microsoft are also working with Intel and Amazon using Intel Bridge to Add Android Apps to Windows 11 Devices (early development pf this is available in the Developer Insider Preview, US Location only).
#winget #windows11 #github