Microsoft's new package manager, winget (following in the footsteps of the Linux tool APT), is supposed to distribute software for Windows. To date, however, it has hardly offered any practical value due to its limited functions. This is starting to change with Preview 0.3, which offers functions for uninstalling or upgrading.

Windows Package Manager takes a similar approach to Chocolatey or Ninite, which have been able to add or remove standard programs under Windows for some time now. They use central or local repositories as sources for installation packages.

Originally, Microsoft provided only one repository on GitHub for winget, which is now accessible via winget.azureedge.net and contains over 1400 packages of free software. Among them are popular editors, packers, graphics programs, and web browsers, as well as many tools for developers and administrators.

Until now, winget could only search for products, display details about them, and install the software. It was not able to list locally installed programs, update them, or remove them.

Management of all Windows programs

The biggest obstacle to the implementation of these functions was that winget should not only manage programs that it added itself, but also those that entered the system via other mechanisms, such as MSI, EXE-Installer, APPX, or MSIX.

The command list, introduced in Preview 0.3, is now used to display the software that has already been installed. Essentially, it mirrors what you see in the system control panel under Uninstall programs. The command

winget list

outputs the name, ID, and version of each application.

The winget list displays all installed programs regardless of their source

The winget list displays all installed programs regardless of their source

If you want to limit the list to certain products, use a substring search (winget does not support wildcards). Thus

winget list xbox

would return all Xbox apps preinstalled on Windows 10.

Removing programs

If you then try to remove them with the uninstall command, which is new as well, the attempt will fail; however, it works with MSI across the board. In the case of store apps, you will get a message that the corresponding package was not found.

Only store apps that are installed via winget can be removed it cannot uninstall the existing ones

Only store apps that are installed via winget can be removed it cannot uninstall the existing ones

This happens although Microsoft has integrated the store as an additional source with Preview 0.3. However, not all apps can be installed from there; rather, winget only lists about 300 selected applications with this command:

winget search -s msstore
winget only has access to a small selection of store apps

winget only has access to a small selection of store apps

As you can easily see, almost none of the apps that are preinstalled in Windows 10 can be found among them. The error message stating that no package could be found obviously refers to the repository.

Limited export function

This is also supported by the behavior of the export command, which is also new. It is used to write the list of installed programs to a JSON file so that the programs can be installed on another computer in one go using the import function.

Here you get the message, "The installed package is not available in any source" for most applications. To export the programs that winget has found locally, it apparently must be able to link them to a manifest on one of the repositories. This contains metadata, such as the publisher, the name, or the version of the software.

Currently winget cannot export most programs and none of the preinstalled store apps

Currently winget cannot export most programs and none of the preinstalled store apps

One of the biggest tasks in making winget a practical tool is not only to provide the repositories with as much software as possible but also to fully document them with manifest files. Otherwise, an automatic update, which the newly added upgrade command provides, is out of the question.

Activation of experimental functions

All the new features mentioned above, i.e., both the additional commands and the integration of the app store, are still in the experimental state. Therefore, you first have to activate them by editing the configuration file. This can be opened using

winget settings

in the standard editor for the JSON format.

The configuration for winget is in JSON format. Activate the experimental functions here.

The configuration for winget is in JSON format. Activate the experimental functions here.

Here, you insert the following section:

"experimentalFeatures": {
	"experimentalCmd": true,
		"experimentalArg": false,
		"experimentalMSStore": true,
		"list": true,
		"upgrade": true,
		"uninstall": true,
		"export": true
}

In addition to the Microsoft Store as a source, it also activates the still provisional commands list, upgrade, uninstall, and export, which were added with Preview 0.3.

The experimental features are available only after the configuration update

The experimental features are available only after the configuration update

Availability

Microsoft delivers winget as a feature of the Desktop App Installer. The current version can be downloaded from GitHub and installed via sideloading.

On this page, you can also find DesktopAppInstallerPolicies.zip, which contains an ADMX template that includes several language files.

Subscribe to 4sysops newsletter!

GPO settings for winget available in the Computer Configuration branch under Windows Components

GPO settings for winget available in the Computer Configuration branch under Windows Components

It allows admins to configure winget via group policies. This way they can completely disable the package manager on certain PCs, and it can also be used to specify approved repositories, for example.

avatar
3 Comments
  1. Allan 2 years ago

    It seems that winget is not ready for prime time yet.

    avatar
    • It is now significantly improved with the latest version (v1.2) supported on Win 10 (1809+) and Win 11.

  2. timon 2 years ago

    thank u

Leave a reply

Your email address will not be published. Required fields are marked *

*

© 4sysops 2006 - 2023

CONTACT US

Please ask IT administration questions in the forums. Any other messages are welcome.

Sending

Log in with your credentials

or    

Forgot your details?

Create Account