Where to begin?
I believe I have Winget installed, but how do I check? What should I do to get started?
First thing’s first, go ahead and open up a command prompt or PowerShell Terminal. Go ahead and just type the word “Winget” in the terminal and take a look at the response. You may get asked to agree to the terms the first time around, but you ought to get a response, and if it’s already installed, you could the version and list of available commands at the ready.
C:\>winget
Windows Package Manager v1.7.10861
Copyright (c) Microsoft Corporation. All rights reserved.
The winget command line utility enables installing applications and other packages from the command line.
usage: winget [<command>] [<options>]
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 Shows and performs available upgrades
uninstall Uninstalls the given package
hash Helper to hash installer files
validate Validates a manifest file
settings Open settings or set administrator settings
features Shows the status of experimental features
export Exports a list of the installed packages
import Installs all the packages in a file
pin Manage package pins
configure Configures the system into a desired state
download Downloads the installer from a given package
repair Repairs the selected package
One Thing to Keep in Mind,
When you are using Winget in the Terminal, it is using the account that the shell is associated with. In other words, if the account you are using isn’t an administrator, you will not be able to install any components system wide. However, you could get away with installing software that is limited to a single profile typically. For all intents and purposes of this tutorial, we will be using an administrative terminal. ๐ – I will go into other profile-based installs in a later post.
Installing Your First Piece of Software,
Let’s work with “Zoom“, this is typically good use case for updates in an environment.
First, we have to obtain the “ID” of the application, which I will refer to as the Winget ID, as these are unique to the Winget Platform. This can be obtained from searching Winget.Run for the ID, or you can use the built in search within Winget. Note* If you search multiple words, they will need to be in quotations to account for spaces.
Let’s use:
C:\> Winget Search Zoom
You should then see the response:
C:\>Winget Search Zoom
Name Id Version Match Source
------------------------------------------------------------------------------------------------------------
Zoom - One Platform to Connect XP99J3KP4XZ4VV Unknown msstore
Crosshair Zoom 9P2ZTH30XXGL Unknown msstore
Zoom Player XP88X30WJ519GR Unknown msstore
Zoom Zoom.Zoom 5.17.11.34827 winget
Zoom Outlook Plugin Zoom.ZoomOutlookPlugin 5.17.10 Tag: zoom winget
Fotophire Photo Maximizer Wondershare.Fotophire.Maximizer 1.3.1 Tag: zoom winget
AeroZoom Beta wandersick.AeroZoom 4.0.2 Tag: zoom winget
Virtual Magnifying Glass VirtualMagnifyingGlass.VirtualMagnifyingGlass 3.6 Tag: zoom winget
Final2x Tohrusky.Final2x 1.2.0 Tag: zoom winget
Resizer den4b.Resizer 2.1.0.0 Tag: zoom winget
Zoom Rooms Zoom.ZoomRooms 5.17.7 winget
ZoomIt Microsoft.Sysinternals.ZoomIt 8.01 winget
There are some things to notice here. First of all, all the ID’s seem to make sense, except for the ones with source listed as “msstore“. Those would be the applications built directly from the Microsoft Store if it wasn’t already evident ๐- Those are profile-based installations and won’t install for the entire system (with some exceptions), but let’s focus on all the ones with the source “Winget”.
We will see a few options that standout to us amongst these:
Name Id Version Match Source
------------------------------------------------------------------------------------------------------------
Zoom - One Platform to Connect XP99J3KP4XZ4VV Unknown msstore
Zoom Player XP88X30WJ519GR Unknown msstore
Zoom Zoom.Zoom 5.17.11.34827 winget
Zoom Outlook Plugin Zoom.ZoomOutlookPlugin 5.17.10 Tag: zoom winget
Zoom Rooms Zoom.ZoomRooms 5.17.7 winget
These seem to be viable options, but which one to choose? Going with the Winget source, the Winget ID’s are typically generated in this format:
Name <Publisher.Application>
-------------------------------------------------------
Zoom Zoom.Zoom
Zoom Outlook Plugin Zoom.ZoomOutlookPlugin
Zoom Rooms Zoom.ZoomRooms
Now that we have an understanding of what ID’s we are grabbing, let use “Zoom.Zoom” to install our first application.
C:\>winget install zoom.zoom
This combination will work to perform the installation, you should see the following start to occur:
C:\>winget install zoom.zoom
Found Zoom [Zoom.Zoom] Version 5.17.11.34827
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://zoom.us/client/5.17.11.34827/ZoomInstallerFull.exe?archType=x64
โโโโโโโโโโโโโโ 40.0 MB / 86.7 MB
Until the software is completely installed on the machine:
C:\>winget install zoom.zoom
Found Zoom [Zoom.Zoom] Version 5.17.11.34827
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://zoom.us/client/5.17.11.34827/ZoomInstallerFull.exe?archType=x64
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 86.7 MB / 86.7 MB
Successfully verified installer hash
Starting package install...
Successfully installed
C:\>
In this case, it installed without additional prompts, but most cases if you use the install command without any additional switches, you will likely see prompts for the installations occur in the foreground of the PC, but this concludes the basic standard installation of software using Winget.
How Do I Know I Am Getting an Updated Version?
The Winget Repository is very consistently updated by the publishers to adhere to their latest builds. Winget will automatically install the latest version it has in the repo. However, you can also check to see if you have any available updates for Winget applicable applications using “Winget List“:
C:\>winget list zoom
Name Id Version Available Source
------------------------------------------------
Zoom Zoom.Zoom 5.17.7.31859 5.17.11.34827 winget
Notice it currently shows the available version? You can use this for any search criteria for installed applications.
How to Upgrade Software,
You can simply use the “Upgrade” command on the Winget ID to upgrade the software to the latest version that you have an available update for. If you already have the latest version, it will inform you that there is no update available. ๐
C:\>winget upgrade zoom.zoom
Found Zoom [Zoom.Zoom] Version 5.17.11.34827
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://zoom.us/client/5.17.11.34827/ZoomInstallerFull.exe?archType=x64
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 86.7 MB / 86.7 MB
Successfully verified installer hash
Starting package install...
Successfully installed
C:\>
List My Available Software,
You can use “Winget List” to see all applicable software on a system, without specifying a search term.
C:\>winget list
Name Id Version Available Source
-------------------------------------------------------------------------------------------------------------------
Android Studio Android Studio 2023.1
Intelยฎ Graphics Command Center AppUp.IntelGraphicsExperience_8j3eq9eโฆ 1.100.5390.0
ThunderboltTM Control Center AppUp.ThunderboltControlCenter_8j3eq9โฆ 1.0.37.0
Logitech Unifying Software 2.52 Logitech.UnifyingSoftware 2.52.33 winget
List Available Upgrades,
You can use “Winget Upgrade” to see all available updates on a system along with their corresponding versions:
C:\>winget upgrade
Name Id Version Available Source
-------------------------------------------------------------------------------------------------------------------
Dev Home Microsoft.DevHome 0.1200.442.0 0.1201.442.0 winget
Microsoft Visual C++ 2010 x86 Redistributable - โฆ Microsoft.VCRedist.2010.x86 10.0.30319 10.0.40219 winget
GitHub Desktop Deployment Tool GitHub.GitHubDesktop 3.3.11.0 3.3.12 winget
Microsoft Windows Desktop Runtime - 6.0.28 (x64) Microsoft.WindowsAppRuntime.1.5 < 1.5.0 6.0.28 winget
if you add the “–all” switch, it will actually begin to update everything available on the machine, in one simple command. As an example:
C:\>winget upgrade --all
Name Id Version Available Source
-------------------------------------------------------------------------------------------------------------------
Dev Home Microsoft.DevHome 0.1200.442.0 0.1201.442.0 winget
Microsoft Visual C++ 2010 x86 Redistributable - โฆ Microsoft.VCRedist.2010.x86 10.0.30319 10.0.40219 winget
GitHub Desktop Deployment Tool GitHub.GitHubDesktop 3.3.11.0 3.3.12 winget
Microsoft Windows Desktop Runtime - 6.0.28 (x64) Microsoft.WindowsAppRuntime.1.5 < 1.5.0 6.0.28 winget
4 upgrades available.
Installing dependencies:
This package requires the following dependencies:
- Packages
Microsoft.WindowsAppRuntime.1.5
(1/2) Found Dev Home (Preview) [Microsoft.DevHome] Version 0.1201.442.0
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Successfully verified installer hash
Starting package install...
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 95%
Successfully installed
(2/2) Found Microsoft .NET Windows Desktop Runtime 6.0 [Microsoft.DotNet.DesktopRuntime.6] Version 6.0.28
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://dotnetcli.azureedge.net/dotnet/WindowsDesktop/6.0.28/windowsdesktop-runtime-6.0.28-win-x64.exe
โโโโโโโ 12.0 MB / 54.7 MB
What About Removing Software?
You can most certainly use this to remove software off of a machine as well. You can use the “Winget Uninstall” command with the Winget ID as shown:
C:\>winget uninstall zoom.zoom
Found Zoom [Zoom.Zoom]
Starting package uninstall...
Successfully uninstalled
It can be as simple as that! ๐
Import & Export?? 0.0
One last set of commands worth venturing are the “Import” and “Export” commands. These will let you export a list of the all the Winget IDs of applicable software you have on one system, as well as install all those IDs in one import on the next computer. It doesn’t export any files or software, but just the IDs in order to download the latest versions on the second machine.
after export, you can set an path you want to create the .JSON file in.
C:\>winget export c:\MyApps.json
And on the second machine, all you would need to do, is move the file over, take note of the full path of where that file is located and import it as follows:
C:\>winget import c:\MyApps.json
As you can see, these .JSON files will just contain all the Winget IDs that it needs to find and locate the installers for the next machine:
"$schema" : "https://aka.ms/winget-packages.schema.2.0.json",
"CreationDate" : "2024-03-29T09:33:43.398-00:00",
"Sources" :
[
{
"Packages" :
[
{
"PackageIdentifier" : "Logitech.UnifyingSoftware"
},
{
"PackageIdentifier" : "Microsoft.Edge"
},
{
"PackageIdentifier" : "Microsoft.EdgeWebView2Runtime"
},
{
"PackageIdentifier" : "Microsoft.AppInstaller"
},
{
"PackageIdentifier" : "Microsoft.UI.Xaml.2.7"
}
Is That All I Need to Know?
For the standard commands, that pretty much sums it up ๐. However, as administrator, there are a lot more customizations that you more than likely will want to incorporate along the way. I will be expanding on this on a “Winget: Notes from the Field, Avoid Mistakes” post. This includes silent installations, using package/source agreements, User/Machine Scopes, and what I have done to get past a few common errors. Hope to see you there!