Skip to main content
The install command installs the specified application. You can also use the add alias.

Syntax

winget install [<query>...] [options]

Arguments

query
string
Search query to find the package. Can match against package ID, name, or moniker.

Package Selection Options

--id
string
Filter by package identifier (exact match with —exact)
--name
string
Filter by package name
--moniker
string
Filter by package moniker
-m, --manifest
path
Path to a manifest file for direct installation
-v, --version
string
Specify package version to install
-s, --source
string
Source to search for the package (e.g., “winget”, “msstore”)
-e, --exact
flag
Use exact string matching for queries
--scope
string
Installation scope: user or machine
-a, --architecture
string
Select installer architecture: x86, x64, arm, arm64
--installer-type
string
Select installer type: msix, msi, exe, inno, nullsoft, wix, burn, portable
--locale
string
Locale to use (BCP-47 format, e.g., en-US)

Installation Behavior

-i, --interactive
flag
Run installer in interactive mode
-h, --silent
flag
Run installer in silent mode
-o, --log
path
Path to write installer log file
-l, --location
path
Installation directory (if supported by installer)
--override
string
Override installer arguments
--custom
string
Additional arguments to pass to installer
--force
flag
Override installer hash check failures and compatibility checks
--ignore-security-hash
flag
Ignore installer hash validation (not recommended)
--ignore-local-archive-malware-scan
flag
Skip malware scan for local archive installers
--accept-package-agreements
flag
Accept all license agreements
--accept-source-agreements
flag
Accept all source agreements
-r, --rename
string
Rename executable (for portable packages)
--no-upgrade
flag
Skip package upgrade if already installed
--uninstall-previous
flag
Uninstall previous version before installing
--allow-reboot
flag
Allow installer to request a reboot

Dependencies

--skip-dependencies
flag
Skip dependency installation
--dependency-source
string
Source to search for dependencies

Authentication

--header
string
Custom HTTP header for source requests
--authentication-mode
string
Authentication mode: silent, silentPreferred, interactive
--authentication-account
string
Account to use for authentication

Examples

Install a package by ID:
winget install Microsoft.PowerToys
Install with exact match:
winget install --id Microsoft.PowerToys --exact
Install a specific version:
winget install Microsoft.PowerToys --version 0.70.0
Install from a manifest file:
winget install --manifest .\manifest.yaml
Install in interactive mode:
winget install Microsoft.VisualStudioCode --interactive
Install to a specific location:
winget install Microsoft.PowerToys --location "C:\Tools\PowerToys"
Install with custom architecture:
winget install Python.Python.3.11 --architecture x64
Install accepting all agreements:
winget install Microsoft.PowerToys --accept-package-agreements --accept-source-agreements --silent

Exit Codes

  • 0 - Success
  • 0x8A150001 - Package not found
  • 0x8A150002 - No applicable installer
  • 0x8A150011 - User cancelled
  • 0x8A150014 - Package already installed with —no-upgrade
If a package is already installed and you don’t use --force, WinGet will attempt to upgrade it instead.
Using --ignore-security-hash skips security validation and is not recommended for production use.

Build docs developers (and LLMs) love