iTranslated by AI
Windows: winget: Installing Apps with Options
Introduction
With winget, you can specify options during installation. However, since it is still in development preview, not everything works perfectly.
In this article, I will explain useful options to know. Based on results tested with winget v1.0.11694
Basic Installation Syntax
winget installs apps using the following syntax:
winget install <package> [<options>]
<package> specifies the package of the app to be installed. For how to specify it, please refer to Basic app installation methods with winget.
<options> specifies the detailed behavior of the installer. Frequently used options are explained in this article.
Frequently Used Options
I will explain frequently used options.
-
--help
Outputs information about each option available for theinstallcommand.PowerShellwinget install --help -
-i,--interactive
Performs an interactive installation. User input may be required.PowerShellwinget install <package> --interactive -
-h,--silentPerforms a silent installation. If supported by the package
PowerInstallwinget install <package> --silent -
-o,--log
Outputs the installation log to the specified log file.winget install <package> --log <logfile> -
-e,--exact
Installs the package that exactly matches the input keyword, including case sensitivity. Mainly used to specify packages by IDPowerShellwinget install --exact <package> -
-v,--version
Installs the specified version of the package. ~(If this option is not specified, the latest version will be installed)~PowerShellwinget install <package> --version <version> -
-l,--location
Installs the app at the location specified in the option. If supported by the package
Currently, folders containing spaces are not supportedPowerShellwinget install <package> --location <installDir> -
--override
Specifies options for the package's installer.
Use this option for fine-grained app-specific settings, such as changing the installation destination.
If you want to specify multiple options, wrap them in quotesPowerShellwinget install <package> --override <installOption>
Links
The following links are helpful for reference:
-
install command (winget)
- Microsoft official documentation
Discussion