Skip to content

Commit c8a4409

Browse files
authored
Merge pull request #4526 from mdanish-kh/fixArgsAndOptions
Update arguments and options of WinGet commands
2 parents 2c85a1a + 7553683 commit c8a4409

File tree

12 files changed

+351
-150
lines changed

12 files changed

+351
-150
lines changed

hub/package-manager/winget/export.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,23 @@ The **export** command is often used to create a file that you can share with ot
2525
The following arguments are available.
2626

2727
| Argument | Description |
28-
|-------------|-------------|
28+
|-------------|-------------|
2929
| **-o,--output** | Path to the JSON file to be created |
3030

3131
## Options
3232

3333
The options allow you to customize the export experience to meet your needs.
3434

3535
| Option | Description |
36-
|----------------|-------------|
36+
|----------------|-------------|
3737
| **-s, --source** | [Optional] Specifies a source to export files from. Use this option when you only want files from a specific source. |
3838
| **--include-versions** | [Optional] Includes the version of the app currently installed. Use this option if you want a specific version. By default, unless specified, [**import**](./import.md) will use latest. |
3939
| **--accept-source-agreements** | Used to accept the source license agreement, and avoid the prompt. |
40-
| **--verbose-logs** | Used to override the logging setting and create a verbose log. |
40+
| **-?,--help** | Shows help about the selected command. |
41+
| **--wait** | Prompts the user to press any key before exiting. |
42+
| **--logs,--open-logs** | Open the default logs location. |
43+
| **--verbose, --verbose-logs** | Used to override the logging setting and create a verbose log. |
44+
| **--disable-interactivity** | Disable interactive prompts. |
4145

4246
## JSON schema
4347

@@ -46,7 +50,7 @@ The driving force behind the **export** command is the JSON file. You can find t
4650
The JSON file includes the following hierarchy.
4751

4852
| Entry | Description |
49-
|-------------|-------------|
53+
|-------------|-------------|
5054
| **Sources** | The sources application manifests come from. |
5155
| **Packages** | The collection of packages to install. |
5256
| **PackageIdentifier** | The Windows Package Manager package identifier used to specify the package. |

hub/package-manager/winget/hash.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,19 @@ The following arguments are available:
3131
| Argument | Description |
3232
|--------------|-------------|
3333
| **-f,--file** | The path to the file to be hashed. |
34+
35+
## Options
36+
37+
The options allow you to customize the hash experience to meet your needs.
38+
39+
| Option | Description |
40+
|-------------|-------------|
3441
| **-m,--msix** | Specifies that the hash command will also create the SHA-256 SignatureSha256 for use with MSIX installers. |
35-
| **--verbose-logs** | Used to override the logging setting and create a verbose log. |
3642
| **-?, --help** | Gets additional help on this command. |
43+
| **--wait** | Prompts the user to press any key before exiting. |
44+
| **--logs,--open-logs** | Open the default logs location. |
45+
| **--verbose, --verbose-logs** | Used to override the logging setting and create a verbose log. |
46+
| **--disable-interactivity** | Disable interactive prompts. |
3747

3848
## Related topics
3949

hub/package-manager/winget/import.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,25 @@ The **import** command is often used to share your developer environment or buil
2323
The following arguments are available.
2424

2525
| Argument | Description |
26-
|-------------|-------------|
26+
|-------------|-------------|
2727
| **-i,--import-file** | JSON file describing the packages to install. |
2828

2929
## Options
3030

3131
The options allow you to customize the import experience to meet your needs.
3232

3333
| Option | Description |
34-
|-------------|-------------|
34+
|-------------|-------------|
3535
| **--ignore-unavailable** | Suppresses errors if the app requested is unavailable. |
3636
| **--ignore-versions** | Ignores versions specified in the JSON file and installs the latest available version. |
37+
| **--no-upgrade** | Skips upgrade if an installed version already exists. |
3738
| **--accept-package-agreements** | Used to accept the license agreement, and avoid the prompt. |
3839
| **--accept-source-agreements** | Used to accept the source license agreement, and avoid the prompt. |
39-
| **--verbose-logs** | Used to override the logging setting and create a verbose log. |
40+
| **-?,--help** | Shows help about the selected command. |
41+
| **--wait** | Prompts the user to press any key before exiting. |
42+
| **--logs,--open-logs** | Open the default logs location. |
43+
| **--verbose, --verbose-logs** | Used to override the logging setting and create a verbose log. |
44+
| **--disable-interactivity** | Disable interactive prompts. |
4045

4146
## JSON Schema
4247

@@ -45,7 +50,7 @@ The driving force behind the **import** command is the JSON file. You can find t
4550
The JSON file includes the following hierarchy.
4651

4752
| Entry | Description |
48-
|-------------|-------------|
53+
|-------------|-------------|
4954
| **Sources** | The sources application manifests come from. |
5055
| **Packages** | The collection of packages to install. |
5156
| **PackageIdentifier** | The Windows Package Manager package identifier used to specify the package. |

hub/package-manager/winget/install.md

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.localizationpriority: medium
88

99
# install command (winget)
1010

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.
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.
1212

1313
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.
1414

@@ -23,9 +23,8 @@ The **install** command requires that you specify the exact string to install. I
2323
The following arguments are available.
2424

2525
| Argument | Description |
26-
|-------------|-------------|
26+
|-------------|-------------|
2727
| **-q,--query** | The query used to search for an app. |
28-
| **-?, --help** | Get additional help on this command. |
2928

3029
> [!NOTE]
3130
> The query argument is positional. Wild-card style syntax is not supported. This is most often the string of characters you expect to uniquely identify the package you wish to install.
@@ -35,28 +34,38 @@ The following arguments are available.
3534
The options allow you to customize the install experience to meet your needs.
3635

3736
| Option | Description |
38-
|-------------|-------------|
37+
|-------------|-------------|
3938
| **-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). |
40-
| **--id** | Limits the install to the ID of the application. |
41-
| **--name** | Limits the search to the name of the application. |
42-
| **--moniker** | Limits the search to the moniker listed for the application. |
43-
| **-v, --version** | Enables you to specify an exact version to install. If not specified, latest will install the highest versioned application. |
44-
| **-s, --source** | Restricts the search to the source name provided. Must be followed by the source name. |
45-
| **--scope** | Allows you to specify if the installer should target user or machine scope. See [known issues relating to package installation scope](./troubleshooting.md#scope-for-specific-user-vs-machine-wide).|
46-
| **-a, --architecture** | Select the architecture to install. |
47-
| **-e, --exact** | Uses the exact string in the query, including checking for case-sensitivity. It will not use the default behavior of a substring. |
48-
| **-i, --interactive** | Runs the installer in interactive mode. The default experience shows installer progress. |
49-
| **-h, --silent** | Runs the installer in silent mode. This suppresses all UI. The default experience shows installer progress. |
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** | Allows you to specify if the installer should target user or machine scope. See [known issues relating to package installation scope](./troubleshooting.md#scope-for-specific-user-vs-machine-wide).|
45+
| **-a, --architecture** | Select the architecture to install. |
46+
| **-e, --exact** | Uses the exact string in the query, including checking for case-sensitivity. It will not use the default behavior of a substring. |
47+
| **-i, --interactive** | Runs the installer in interactive mode. The default experience shows installer progress. |
48+
| **-h, --silent** | Runs the installer in silent mode. This suppresses all UI. The default experience shows installer progress. |
5049
| **--locale** | Specifies which locale to use (BCP47 format). |
5150
| **-o, --log** | Directs the logging to a log file. You must provide a path to a file that you have the write rights to. |
51+
| **--custom** | Arguments to be passed on to the installer in addition to the defaults. |
5252
| **--override** | A string that will be passed directly to the installer. |
5353
| **-l, --location** | Location to install to (if supported). |
54-
| **--force** | Overrides the installer hash check. Not recommended. |
54+
| **--ignore-security-hash** | Ignore the installer hash check failure. Not recommended. |
55+
| **--ignore-local-archive-malware-scan** | Ignore the malware scan performed as part of installing an archive type package from local manifest. |
56+
| **--dependency-source** | Find package dependencies using the specified source. |
5557
| **--accept-package-agreements** | Used to accept the license agreement, and avoid the prompt. |
5658
| **--accept-source-agreements** | Used to accept the source license agreement, and avoid the prompt. |
59+
| **--no-upgrade** | Skips upgrade if an installed version already exists. |
5760
| **--header** | Optional Windows-Package-Manager REST source HTTP header. |
5861
| **-r, --rename** | The value to rename the executable file (portable) |
59-
| **--verbose-logs** | Used to override the logging setting and create a verbose log. |
62+
| **--uninstall-previous** | Uninstall the previous version of the package during upgrade |
63+
| **--force** | Direct run the command and continue with non security related issues. |
64+
| **-?, --help** | Get additional help on this command. |
65+
| **--wait** | Prompts the user to press any key before exiting. |
66+
| **--logs,--open-logs** | Open the default logs location. |
67+
| **--verbose, --verbose-logs** | Used to override the logging setting and create a verbose log. |
68+
| **--disable-interactivity** | Disable interactive prompts. |
6069

6170
### Example queries
6271

@@ -85,7 +94,7 @@ If the query provided to **winget** does not result in a single application, the
8594
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:
8695

8796
```CMD
88-
winget install --id Git.Git -e
97+
winget install --id Git.Git -e
8998
```
9099

91100
If multiple sources are configured, it is possible to have duplicate entries. Specifying a source is required to further disambiguate.
@@ -107,7 +116,7 @@ The **manifest** option enables you to install an application by passing in a YA
107116
Usage: `winget install --manifest \<path>`
108117

109118
| Option | Description |
110-
|---------|-------------|
119+
|---------|-------------|
111120
| **-m, --manifest** | The path to the manifests of the application to install. |
112121

113122
> [!NOTE]
@@ -119,7 +128,7 @@ The log files for winget unless redirected, will be located in the following fol
119128

120129
## License Agreements
121130

122-
Some applications when installed will require the user to agree to the license or other agreements before installing. When this occurs, the Windows Package Manager will prompt the user to agree to the agreements. If the user does not agree, the application will not install.
131+
Some applications when installed will require the user to agree to the license or other agreements before installing. When this occurs, the Windows Package Manager will prompt the user to agree to the agreements. If the user does not agree, the application will not install.
123132

124133
![Image of agreement](./images/agreements.png)
125134

hub/package-manager/winget/list.md

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: list Command
3-
description: Displays the list of listed apps and if an update is available.
3+
description: Displays the list of listed apps and if an update is available.
44
ms.date: 05/5/2021
55
ms.topic: overview
66
ms.localizationpriority: medium
@@ -28,9 +28,8 @@ The **list** command also supports filters which can be used to limit your list
2828
The following arguments are available.
2929

3030
| Argument | Description |
31-
|-------------|-------------|
31+
|-------------|-------------|
3232
| **-q,--query** | The query used to search for an app. |
33-
| **-?, --help** | Get additional help on this command. |
3433

3534
> [!NOTE]
3635
> The query argument is positional. Wild-card style syntax is not supported. This is most often the string of characters you expect to help find the installed package you are searching for.
@@ -40,18 +39,24 @@ The following arguments are available.
4039
The options allow you to customize the list experience to meet your needs.
4140

4241
| Option | Description |
43-
|-------------|-------------|
44-
| **--id** | Limits the list to the ID of the application. |
45-
| **--name** | Limits the list to the name of the application. |
46-
| **--moniker** | Limits the list to the moniker listed for the application. |
47-
| **-s, --source** | Restricts the list to the source name provided. Must be followed by the source name. |
48-
| **--tag** | Filters results by tags. |
49-
| **--command** | Filters results by command specified by the application. |
42+
|-------------|-------------|
43+
| **--id** | Limits the list to the ID of the application. |
44+
| **--name** | Limits the list to the name of the application. |
45+
| **--moniker** | Limits the list to the moniker listed for the application. |
46+
| **-s, --source** | Restricts the list to the source name provided. Must be followed by the source name. |
47+
| **--tag** | Filters results by tags. |
48+
| **--cmd, --command** | Filters results by command specified by the application. |
5049
| **-n, --count** | Limits the number of apps displayed in one query. |
51-
| **-e, --exact** | Uses the exact string in the list query, including checking for case-sensitivity. It will not use the default behavior of a substring. |
52-
| **--accept-source-agreements** | Used to accept the source license agreement, and avoid the prompt. |
50+
| **-e, --exact** | Uses the exact string in the list query, including checking for case-sensitivity. It will not use the default behavior of a substring. |
51+
| **--scope** | Select installed package scope filter (user or machine). |
5352
| **--header** | Optional Windows-Package-Manager REST source HTTP header. |
54-
| **--verbose-logs** | Used to override the logging setting and create a verbose log. |
53+
| **--accept-source-agreements** | Used to accept the source license agreement, and avoid the prompt. |
54+
| **--upgrade-available** | Lists only packages which have an upgrade available. |
55+
| **-?, --help** | Get additional help on this command. |
56+
| **--wait** | Prompts the user to press any key before exiting. |
57+
| **--logs,--open-logs** | Open the default logs location. |
58+
| **--verbose, --verbose-logs** | Used to override the logging setting and create a verbose log. |
59+
| **--disable-interactivity** | Disable interactive prompts. |
5560

5661
### Example queries
5762

0 commit comments

Comments
 (0)