WINGET install

Install an application with WinGet. Use the WinGet search command to identify the application you want to install. The install command requires that you specify the exact string to install. If there is any ambiguity, you will be prompted to further filter the install command to an exact application.

Syntax
      WINGET install [[-q] \query] [\options] [-?]

Arguments:
   -q, --query   The query used to search for an app.
   -?, --help 	 Get additional help on this command.

Options
   --accept-package-agreements  Accept the license agreement, and avoid the prompt.
   --accept-source-agreements   Accept the source license agreement, and avoid the prompt.
   -a, --architecture  Select the architecture to install.

   -e, --exact        Use the exact string in the query, including checking for case-sensitivity.
                      It will not use the default behavior of a substring.

   --force            Override the installer hash check. Not recommended.
   -h, --silent       Run the installer in silent mode. This suppresses all UI. The default experience shows installer progress.
   -i, --interactive  Run the installer in interactive mode. The default experience shows installer progress.
   --header           Optional Windows-Package-Manager REST source HTTP header.
   --id               Limit the install to the ID of the application.

   --locale           Specify which locale to use (BCP47 format).
   -l, --location     Location to install to (if supported).

   -m, --manifest \path   Where path is a path to the manifest (YAML) file.
                          Use --manifest to run the install experience from a local YAML file.

   --moniker          Limit the search to the moniker listed for the application.
   --name             Limit the search to the name of the application.

   -o, --log          Direct the logging to a log file. Provide a path to a file that you have the write rights to.
   --override         A string that will be passed directly to the installer.

   -s, --source SourceName  Restrict the search to the source name provided. Must be followed by the source name.
   --scope            Specify if the installer should target user or machine scope.
   --verbose-logs     Override the logging setting and create a verbose log.
   -v, --version      Specify an exact version to install. If not specified, latest will install
                      the highest versioned application.

Winget is bundled with Windows 11 by default.

The --manifest option enables you to install an application by passing in a YAML file directly to the client. If the manifest is a multi-file manifest, the directory containing the files must be used.

Installing packages from local manifest files may have risks. As an extra measure of precaution this feature needs to be enabled by an administrator. To enable this feature run winget settings --enable LocalManifestFiles.
To disable this feature run winget settings --disable LocalManifestFiles.

Multiple selections

If the query provided to winget does not result in a single application, then winget will display the results of the search. This will provide you with the additional data necessary to refine the search for a correct install. The best way to limit the selection to one file is to use the id of the application combined with the exact query option.

For example: winget install --id Git.Git -e

If multiple sources are configured, it is possible to have duplicate entries. Specifying a source is required to further disambiguate.

winget install --id Git.Git -e --source winget

The msstore source uses unique identifiers as the "Id" for packages. These do not require the exact query toption.

For example: CMD winget install XP9KHM4BK9FZ7Q -s msstore

Examples

Install software:

C:\> winget install Microsoft.PowerToys

C:\> winget install Microsoft.WindowsTerminal

Install a specific version of an application:

C:\> winget install powertoys --version 0.15.2

Install an application from its ID:

C:\> winget install --id Microsoft.PowerToys

“The first step towards getting somewhere is to decide you’re not going to stay where you are” ~ J.P. Morgan

Related commands

GitHub repository
WINGET - Discover, install, upgrade, remove and configure applications on Windows computers.
MSIEXEC - Microsoft Windows Installer.
WUAUCLT - Windows Update.
Equivalent PowerShell: Install-Package - Install one or more software packages.


 
Copyright © 1999-2024 SS64.com
Some rights reserved