The Windows Package Manager was one of the great innovations that Microsoft introduced last week at BUILD 2020, opening what we think will be a new era for operating system software.

Using package managers to install software will sound awfully familiar to Linux users, but it has not been an option on Microsoft systems. At least not as the company now raises it. And is that Windows 10 “smells” more and more like Linux with the new Terminal and the second version of the Windows for Linux subsystem (WSL2), which comes with the ability to run graphical applications, hardware GPU acceleration and even the Direct3D 12 port for Linux.

Windows Package Manager is another Linux “inspiration”. It is a open source tool like Terminal, it has been developed independently of Windows 10, although it is also included in the system. Its objective is to help developers and users to download and install applications more powerful and flexible than the typical installation from an app store or the usual double-click that we use on an executable in Windows.

Microsoft will maintain a repository of its own applications and also others developed by third parties that can be managed from this administrator.

How to use Windows Package Manager

First of all we will need to get the administrator himself. If you are using the latest trial version of Windows Insider you can already find it in the operating system. You can also download it from the Windows Package Manager Insider program or directly from GitHub where the source code is also offered. The version is in preview phase (beta) and works with Windows 10 1709 or higher versions.

Once you have access to the tool, you can use it in Windows Terminal, in the advanced PowerShell console or from the command line. The command to use is winget[[][[] and it allows functions like:

install – Install the provided application.
show – Show information about an application
source – Manage application sources
search – Search and display basic application information
hash – Auxiliary application to apply a hash algorithm to the installer files
validate – Validate a manifest file

For more information on a specific command you can use the help argument [-?] and how many options are available [-v] [–version], which shows the version of the tool or [–info], which shows general information of the tool.

What can be done from this tool

The first thing you can do is check what software is available for installation. We are going to use Powershell, but you can use Terminal or easier with the command line. For this we use the winget install command and you will see how it returns a long list of applications.

As an example, we are going to install the first available application, the 7Zip open source decompressor. For this we use the command winget install 7Zip. The software will be downloaded automatically from the repository, it will be installed and we can locate it in the Start menu like the rest of the installed applications.

So far the basics. But the Windows package manager becomes particularly powerful if you use scripts like those in .BAT format can be created in notepad. Or create them with another specific tool like winstall. As an example, you can create a simple script to install multiple applications at once, like:

@echo off Echo Install a bunch of appswinget install winrarif

% ERRORLEVEL% EQU 0 Echo WinRAR installed successfully. winget

install thunderbirdif% ERRORLEVEL% EQU 0 Echo Thunderbird

installed successfully.pause

Copy and paste those lines into a text file, add as many applications as you like (copying and pasting lines 3 and 4 and then changing the names of the applications), save it as a .BAT file in notepad and when you need it you run it on the command line.

In Powershell it is different, but even easier, for example to install Python and Discord:

winget install –id = Python.Python -e && winget install –id = Discord.Discord -e

It is not a tool that all users will use, but there you have it in case you regularly manage the Windows console and you need to install applications alternatively or automate the installation of various programs faster and more powerful. The tool is in preview phase and may have errors.

If you want to try it, install from GitHub better than from the Windows Store, which does not work correctly for everyone. We assume that Microsoft will expand the number of applications available in the repository created to use this Windows package manager.

LEAVE A REPLY

Please enter your comment!
Please enter your name here