Windows Package Manager 1.0

Demitrius Nelon

Demitrius

We started a journey to build a native package manager for Windows 10 when we announced the Windows Package Manager preview at Microsoft Build 2020. We released the project on GitHub as an open-source collaborative effort and the community engagement has been wonderful to experience! Here we are today at Microsoft Build 2021…

We are excited to announce the release of Windows Package Manager 1.0!

Windows Package Manager 1.0

Client

The winget client is the main tool you will use to manage packages on your machine. The image below displays winget executed in Windows Terminal via PowerShell. You can see the list of available commands used to manage packages and work with manifests. You can search for a package (search looks at the name, moniker, and tags) using winget search vscode. Installing something on your machine is as easy as winget install PowerToys. You can check for upgrades to packages with winget upgrade or you can just upgrade everything with winget upgrade --all. Are you setting up a new machine? Be sure to winget export packages.json on your current machine (and copy the file to your new machine) so you can winget import packages.json on the new machine. With winget list you can see everything installed in Add / Remove Programs, and you can winget uninstall <SomePackage> to remove it from your system. You can learn more about the commands and syntax from our documentation.

Image winget

How do I get it?

If you are running on any current Windows Insider build or you have signed up for the Windows Package Manager Insider group you may already have it. The Windows Package Manager is distributed with the App Installer from the Microsoft Store. You can also download and install the Windows Package Manager from our GitHub releases page or just directly install the latest available version.

A screenshot the App Installer distributed from the Microsoft Store.

Version 1.0 of Windows Package Manager will soon ship as an automatic update via the Microsoft Store for all devices running Windows 10, version 1809 and later. If you are an IT Professional, we have published information regarding Managing the Windows Package Manager with Group Policy. Users will be able to determine which policies are in force by executing winget --info.

Microsoft Community Repository

The community has contributed over 1,400 unique packages to the Microsoft community repository! You can winget search <SomePackage> to see if the package is available. It still amazes us how many great pieces of software there are for Windows 10 in the repository. When the search doesn’t return any results, you can go through the process to launch Edge and search for the software installer download. Once you find it, you can add it to the community repository, so you don’t have to go through that process again. After writing dozens of manifests by hand we realized there should be a tool for that.

Windows Package Manager Manifest Creator Preview

Today we are releasing another open-source tool to help with submitting packages to the Microsoft community repository. Open your favorite command-line interface and execute winget install wingetcreate to install the Windows Package Manager Manifest Creator. Once the tool has been installed, execute wingetcreate new provide the URL to the installer. Then the tool will download the installer, parse it to determine any of the manifest values available in the installer, and guide you through the process to generate a valid manifest. If you provide your GitHub credentials when prompted, it will even fork the repository, create a new branch, submit a pull request, and provide you the URL to track its progress. The image below displays wingetcreate executed in Windows Terminal via PowerShell.

Image wingetcreate

Private Repositories

Last but not least, we’ve released a reference implementation for the REST API source so you can host your own private repository. This is a new type of source for the Windows Package Manager. Our default source is a “PreIndexed” Package delivered via the Microsoft Store, but you may add additional REST based sources if they properly implement the JSON based REST API schema.

7 comments

Leave a comment

  • Avatar
    p65ils

    I must be missing something, I can’t find reference to any PowerShell support? winget -list outputs a table with fixed formatting that is not an object, so | Format-Table -AutoSize for example does not work, which is a problem when this pre-formatted table has fixed width columns that truncate text. Further, the output doesn’t seem to be supported in a ForEach loop, which makes batch operations and automation an issue.

    The documentation also provides an example of using winget with command line logic that I haven’t seen used in probably 10 years or more:

    @echo off
    winget install Microsoft.Powertoys
    if %ERRORLEVEL% EQU 0 Echo Powertoys installed successfully.

    Just looking for clarification on working with winget with native PowerShell functionality—there seems to be a gap in the documentation that does not dive into this.

  • Avatar
    Chanaka Hettige

    Is there a way to add Sources to already installed packages? As an example:

    Name                            Id                                                       Version             Available Source
    -----------------------------------------------------------------------------------------------------------------------------
    WhatsApp Desktop                5319275A.WhatsAppDesktop_cv1g1gvanyjgm                   2.2119.6.0
    Slack                           91750D7E.Slack_8she8kybcnzg4                             4.16.0.0

    Where neither have Available Sources. But when searching for packages using winget search, both do have packages, of same version. Can I associate these already existing packages to Winget? Or should I reinstall them, one by one?

    PS: This is just two examples. Out my existing ~50 App, only 5 have sources predetermined.

  • Avatar
    Виталий Мещеряков

    Hi!

    I have PowerShell-preview 7.1.0 RC-1 installed.

    Is there any way to upgrade to the current version (currently 7.2.0-preview.6) via PowerShell-preview itself? Or do I have to download the .msi installer?

    I have winget version v1.0.11451 installed.

    Winget finds the PowerShell-preview 7.2.0-preview.6 package via:

    winget show PowerShell-preview

    But the command:

    winget upgrade PowerShell-preview

    gives this result:

    "No installed packages matching the conditions entered were found"

    And another question, if I can only upgrade PowerShell-preview through the .msi installer at this point, won’t all my current PowerShell-preview 7.1.0 RC-1 settings be lost?

  • Avatar
    John Pope

    I have followed the instructions, and have App Installer 1.11.11451.0 installed, but when I type winget I get the following error:

    ‘winget’ is not recognized as an internal or external command, operable program or batch file.

    Any idea what I’m doing wrong ?

  • Sam Hobbs
    Sam Hobbs

    You say Windows 10; that implies this is for both developers and non-developers. I have no idea what a Windows 10 package is. The only packages I know of that exist in the computer are NuGet packages for Visual Studio but you say Windows 10 so I am confused. Maybe this is for packages like NuGet; if so then how is this relevant to NuGet; does this replace NuGet or what? I am confused.

    • Avatar
      ArciTECH

      Basically this MS version of chocolatey package manager. Tt allows you to install the application from various source from a single location. So rather than go to every website and get the installer to be it .exe or .msi you can use a Powershell script and install 20 application at once. It allow trusted and verified applications to be installed. Linux has enjoyed this for years however MS have now got in on the act and this is much appreciated.

      If you not sure then please YouTube or go to their website chocolatey https://chocolatey.org/

  • Avatar
    ArciTECH

    Work as indented much appreciated. Going to test this as a PS script via group policy, etc so much appreciated. Much love for this and I hope this is available via windows admin centre as an extension to deploy packages

    Successfully installed
    PS C:\WINDOWS\system32> winget -list
    Windows Package Manager v1.0.11451
    Copyright (c) Microsoft Corporation. All rights reserved.

    Argument alias was not recognised for the current command : ‘-list’

    The winget command line utility enables installing applications and other packages from the command line.

    usage: winget [] []

    The following commands are available:
    install Installs the given package
    show Shows information about a package
    source Manage sources of packages
    search Find and show basic info of packages
    list Display installed packages
    upgrade Upgrades the given package
    uninstall Uninstalls the given package
    hash Helper to hash installer files
    validate Validates a manifest file
    settings Open settings
    features Shows the status of experimental features
    export Exports a list of the installed packages
    import Installs all the packages in a file

    For more details on a specific command, pass it the help argument. [-?]

    The following options are available:
    -v,–version Display the version of the tool
    –info Display general info of the tool

    More help can be found at: https://aka.ms/winget-command-help
    PS C:\WINDOWS\system32> winget install slack
    Found Slack [SlackTechnologies.Slack]
    This application is licensed to you by its owner.
    Microsoft is not responsible for, nor does it grant any licences to, third-party packages.
    Downloading https://downloads.slack-edge.com/releases/windows/4.16.2/prod/x64/slack-standalone-4.16.2.0.msi
    ██████████████████████████████ 88.0 MB / 88.0 MB
    Successfully verified installer hash
    Starting package install…
    Successfully installed
    PS C:\WINDOWS\system32>