Skip to content

/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

powershell
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-agreements

Flags

FlagEffect
--id ID -e (--exact)select the package by exact ID instead of a fuzzy name match
--silent, -hrun the installer without its UI (if the installer supports it)
--accept-package-agreementsaccept the package license
--accept-source-agreementsaccept the source terms (needed once per source)
--scope user | machineper-user or all-users install
--version Xinstall a specific version
--disable-interactivitynever prompt, fail instead

A whole machine from a file

powershell
winget export -o apps.json
winget import -i apps.json --accept-package-agreements --accept-source-agreements

Machine-wide installs may still trigger a UAC prompt; run the shell as administrator for fully unattended setups.

Sources