/flags/winget/winget-silent-accept-agreements
winget install --silent --accept-package-agreements: unattended installs
The commands on this page have not been executed by our verification runner yet.updated 2026-10-20
- tool
- winget
- command
- winget install
- flag
- --silent --accept-package-agreements --accept-source-agreements
- default
- interactive prompts
On a fresh machine, winget install may stop twice: once to accept the source agreement (the terms of the msstore/winget sources) and once for the package's license. --accept-source-agreements and --accept-package-agreements answer both. --silent asks the installer itself to run without its UI. Together with --id … -e (exact ID) they make installs scriptable.
Unattended install
winget install --id Git.Git -e --silent --accept-package-agreements --accept-source-agreements
winget install --id Microsoft.VisualStudioCode -e --scope user --silent --accept-package-agreements --accept-source-agreementsFlags
| Flag | Effect |
|---|---|
| --id ID -e (--exact) | select the package by exact ID instead of a fuzzy name match |
| --silent, -h | run the installer without its UI (if the installer supports it) |
| --accept-package-agreements | accept the package license |
| --accept-source-agreements | accept the source terms (needed once per source) |
| --scope user | machine | per-user or all-users install |
| --version X | install a specific version |
| --disable-interactivity | never prompt, fail instead |
A whole machine from a file
winget export -o apps.json
winget import -i apps.json --accept-package-agreements --accept-source-agreementsMachine-wide installs may still trigger a UAC prompt; run the shell as administrator for fully unattended setups.
Sources
Related pages
cheat sheets · homebrewHomebrew cheat sheet: install, upgrade, services and BrewfileHomebrew cheat sheet: install and remove formulae and casks, update and upgrade, pin versions, run background services, clean up, and use a Brewfile file.changes · wslWSL 1 vs WSL 2: what changed and how to convert a distributionWSL 2 runs a real Linux kernel in a lightweight VM: full syscall support and fast Linux files, but slower Windows files. Convert with wsl --set-version.compare · aptapt vs apt-get: which one to useapt is the friendlier front end for interactive use, with progress bars, apt list and search; apt-get keeps a stable interface, so scripts should use it.