Skip to main content

Finding packages in the repository

What

winget is a command line tool to manage applications on the Windows 10 and 11 platform.

When/Why

One of the things we can use winget to do is to install software.  But, to do so, we'll need to see if the package we are looking for is in the repository.

How

It is unlikely that we'll need to do this search within FileWave, as it is easiest on a device in front of you, but the answer you find will feed into FileWave, so it is very pertinent.

You can do search for a package using the simple search command below:

# Get the path to winget.exe
$winget = (Get-ChildItem -Path "C:\Program Files\WindowsApps\" -Filter "winget.exe" -Recurse | Sort-Object -Property LastWriteTime | Select-Object -Last 1).FullName

# Get the directory that winget.exe is inside of
$wingetdir = Split-Path -Path $winget -Parent

# we change directory to this locale so we can run the winget command without the full path
cd $wingetdir

#search for a package, like firefox
.\winget.exe search firefox

The results will show as below, and what we are most interested in is the unique identifier (Id):

Wingetrepository.png

In our case, since we want a stable release for production, the Mozilla.Firefox package is one that we'll use later in our installation example. This is actually an example of one that will not silently uninstall because the author has made it so that it will not run silent. You should test from the command line to see if something will or will not uninstall silently.

The repository is quite extensive even now, but will surely grow over time.  You can look at the entire repo with a "winget search" without specifying a keyword.