If you're familiar with Linux distributions, one of the things you learn to use early on is a package manager. These are utilities with names like apt, dpkg, yum and dnf which are used to install and update software installed on the system. There is now an official package manager available for the Windows platform.
Microsoft announced the general availability of the Windows Package Manager at Build 2021. It was first previewed at Build 2020 and Windows Insider builds have been made available over the past year. Now that it's in general release, it's available to everyone and will soon start being included as part of standard Windows Update process.
Getting Started
To get started using the Windows Package Manager, named winget, the first thing you'll want to do is download and install it from the Microsoft Store , or you can download the current installer package directly from the GetHub repository .
After the App Installer package has been installed, you will be able to use the winget command to list the software you have installed on your system and search for updates and new applications. Keep in mind that "Windows Package Manager", "App Installer" and "winget" all refer to the same thing here.
Open the Command Prompt or Windows PowerShell and enter the command:
winget list
You'll see something like this:
It will list all the applications installed on your system, along with their ID and version number. In some cases, the ID will be a descriptive name and in others it will be a GUID value used by the installer.
Notice that winget will not only show you applications which has been installed using the package manager, but also those which have been installed on the system through the Microsoft Store and the traditional approach of using a self-installing executable.
In addition to the list command, the most used commands would be search, install, uninstall and upgrade. The search command can help you find a package in the repository, the install and uninstall commands are self-explanatory, and the upgrade command will show any upgrades available and install them.
You can also use winget to create an inventory of installed software on your system, export it as a JSON file and then import that list of applications on another system. This can greatly simplify the process of deploying applications and development tools to new systems.
There is a complete overview of all of the commands available from Microsoft's documentation at https://docs.microsoft.com/en-us/windows/package-manager/winget/
Creating Package Manifests
To include your own applications in the Windows Package Manger repository, you'll need to create a manifest which describes your software and where to download it. The manifest uses YAML and is simple to understand, however there are some prerequisites:
- Your software should be an installer package like MSI, MSIX and APPX or a self-installing executable (EXE) which supports silent installs. This is important because winget requires the installer to work without showing any dialogs to the user, aside from a UAC prompt.
- If you distribute your software as a self-installing executable, you may need to specify a command line switch which tells it to install silently. There are also special installer types specifically for installers created using InnoSetup and Nullsoft.
- You'll need a GitHub account to submit your package manifest. You can create a free account at https://github.com/join if you don't already have one.
It used to be that you'd also need to install Git on your system, but Microsoft has created a tool which simplifies the process and does most of the work creating the manifest and then pushing it to GitHub. It's called wingetcreate and you download the latest release using winget:
winget install Microsoft.WingetCreate
Once you've tested your installer to ensure it works correctly as a silent install and have created your manifest, you can submit it to Microsoft. It will go through a validation process, and this can take a few minutes as they perform checks to ensure the installer is safe and works correctly.
SocketTools Packages
We've added the redistributable installer packages for SocketTools to the repository and will add future versions of SocketTools when they are released. Once the package manager becomes a standard part of the base Windows distribution, this can make it easier for you to install the redistributable components your applications use.
You can see what installer packages are available by entering the command:
winget search SocketTools
We don't expect end-users to install these redistributable packages on their systems. That's left for you, as developers, to install along with your applications which use SocketTools. However, by including our redistributable packages in the repository, in the future it could make it easier for you to upgrade an end-user's system to the current release of the components.
Here's a list of the redistributable installer packages for SocketTools:
SocketTools 10 .NET Edition
CatalystDevelopment.SocketTools10.InteropRedist_x86
CatalystDevelopment.SocketTools10.InteropRedist_x64
SocketTools 10 ActiveX Edition
CatalystDevelopment.SocketTools10.ActiveXRedist_x86
CatalystDevelopment.SocketTools10.ActiveXRedist_x64
SocketTools 10 Library Edition
CatalystDevelopment.SocketTools10.LibraryRedist_x86
CatalystDevelopment.SocketTools10.LibraryRedist_x64
We plan on making the full development install packages available in the future, but this requires us to make some changes to our installers. For developers to add their software to the repository, it must be capable of performing a completely silent install with no dialog boxes being shown to the user. The only exception is showing a UAC elevation prompt.
We expect the Windows package manager to make software deployment and updates much easier in the future, particularly for developers and administrators.