install.md (5675B)
1 --- 2 title: install Command 3 description: Installs the specified application. 4 ms.date: 04/28/2020 5 ms.topic: overview 6 ms.localizationpriority: medium 7 --- 8 9 # install command (winget) 10 11 The **install** command of the [winget](index.md) tool installs the specified application. Use the [**search**](search.md) command to identify the application you want to install. 12 13 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. 14 15 ## Usage 16 17 `winget install [[-q] <query>] [<options>]` 18 19 The following command aliases are available: \ 20 `add` 21 22  23 24 ## Arguments 25 26 The following arguments are available. 27 28 | Argument | Description | 29 |-------------|-------------| 30 | **-q, --query** | The query used to search for an app. | 31 32 ## Options 33 34 The options allow you to customize the install experience to meet your needs. 35 36 | Option | Description | 37 |-------------|-------------| 38 | **-m, --manifest** | Must be followed by the path to the manifest (YAML) file. You can use the manifest to run the install experience from a [local YAML file](#local-install). | 39 | **--id** | Limits the install to the ID of the application. | 40 | **--name** | Limits the search to the name of the application. | 41 | **--moniker** | Limits the search to the moniker listed for the application. | 42 | **-v, --version** | Enables you to specify an exact version to install. If not specified, latest will install the highest versioned application. | 43 | **-s, --source** | Restricts the search to the source name provided. Must be followed by the source name. | 44 | **--scope** | Select install scope (user or machine) | 45 | **-e, --exact** | Uses the exact string in the query, including checking for case-sensitivity. It will not use the default behavior of a substring. | 46 | **-i, --interactive** | Runs the installer in interactive mode. The default experience shows installer progress. | 47 | **-h, --silent** | Runs the installer in silent mode. This suppresses all UI. The default experience shows installer progress. | 48 | **-o, --log** | Directs the logging to a log file. You must provide a path to a file that you have the write rights to. | 49 | **--override** | A string that will be passed directly to the installer. | 50 | **-l, --location** | Location to install to (if supported). | 51 | **--force** | Override the installer hash check. | 52 | **-a, --architecture** | Select the architecture | 53 | **--installer-type** | Select the installer type | 54 | **--locale** | Locale to use (BCP47 format) | 55 | **--custom** | Arguments to be passed on to the installer in addition to the defaults | 56 | **--ignore-security-hash** | Ignore the installer hash check failure | 57 | **--skip-dependencies** | Skip processing package dependencies and Windows features | 58 | **--ignore-local-archive-malware-scan** | Ignore the malware scan performed as part of installing an archive-type package from a local manifest | 59 | **--dependency-source** | Find package dependencies using the specified source | 60 | **--accept-package-agreements** | Accept all license agreements for packages | 61 | **--no-upgrade** | Skip upgrade if an installed version already exists | 62 | **--header** | Optional Windows-Package-Manager REST source HTTP header | 63 | **--accept-source-agreements** | Accept all source agreements during source operations | 64 | **-r, --rename** | The value to rename the executable file (portable) | 65 | **--uninstall-previous** | Uninstall the previous version of the package during the upgrade | 66 | **--ignore-interactivity** | Disable interactive prompts | 67 | **-?, --help** | Get additional help on this command. | 68 | **--wait** | Prompts the user to press any key before exiting | 69 | **--logs, --open-logs** | Open the default logs location | 70 | **--verbose, --verbose-logs** | Enables verbose logging for winget | 71 | **--disable-interactivity** | Disable interactive prompts | 72 73 ### Example queries 74 75 The following example installs a specific version of an application. 76 77 ```CMD 78 winget install powertoys --version 0.15.2 79 ``` 80 81 The following example installs an application from its **Package Identifier**. 82 83 ```CMD 84 winget install --id Microsoft.PowerToys 85 ``` 86 87 The following example installs an application by version and ID. 88 89 ```CMD 90 winget install --id Microsoft.PowerToys --version 0.15.2 91 ``` 92 93 ## Multiple selections 94 95 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. 96 97 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: 98 99 ```CMD 100 winget install --id Git.Git -e 101 ``` 102 103 If multiple sources are configured, it is possible to have duplicate entries. Specifying a source is required to further disambiguate. 104 105 ```CMD 106 winget install --id Git.Git -e --source winget 107 ``` 108 109 ## Local install 110 111 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. The **manifest** option has the following usage. 112 113 Usage: `winget install --manifest <path>` 114 115 | Option | Description | 116 |---------|-------------| 117 | **-m, --manifest** | The path to the manifest of the application to install. | 118 119 ### Log files 120 121 The log files for winget unless redirected, will be located in the following folder: **\%temp%\\AICLI\\*.log** 122 123 ## Related topics 124 125 * [Use the winget tool to install and manage applications](index.md)