Skip to main content

Upgrading a package with WinGet

What

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

When/Why

Of course, installing a package is only the beginning.  After we initially install any package, we'll have to come back from time to time to update that application for security and feature updates.

Similarly to other platforms where installs are coming directly from a CDN source, any software installed in this method will bypass FileWave boostersBoosters since the content is coming straight from the internet.

How

OurNow processthat the Fileset is created you can consider the possible settings. Clicking the Fileset and then Properties in the toolbar will bring you to the possible settings.

image.png

Below is the properties dialog for updatingthe aFileset. package

is

image.png

very similar

Things to our installation code, and equally simple.  We'll use the winget "upgrade" command to update a previously installed package.  You'll find Microsoft documentationconsider on the upgradeproperties commanddialog:

here.
  • Name And- Is it the upgradename commandyou isexpected?
  • shown in action in the last line below:

    # Get the path to winget.exe
    $winget = (Get-ChildItem
  • URL -Path "C:\ProgramThe 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 # adding the authorization acceptance here is superfluous if it has already been accepted, but it won't harm anything to include .\winget.exe upgrade --exact --id Mozilla.Firefox --accept-package-agreements --accept-source-agreements --source winget
  • Utilizationpublisher of the --versionsoftware. optionGo maythere beand very helpful as well sinceconfirm it letsis what you controlexpected. upgrading

  • Upgrade automatically at verify - Do you want the system to acheck specificfor version.an update every 24 hours and install it at system boot?

If you check the Upgrade automatically at verify it will always update to the latest version of the application when it releases. Most people will probably want this checked.