Skip to content

Commit b08db2a

Browse files
docs: fix multiple documentation issues (#5296, #5921, #5108, #4372, #5867) (#6110)
## Summary This PR addresses 5 open documentation Task issues: ### Changes | Issue | Description | File Changed | |-------|-------------|--------------| | #5296 | Add missing `downloadBehavior` and `defaultDownloadDirectory` settings to Settings.md | `doc/Settings.md` | | #5921 | Add PowerShell module (`Microsoft.WinGet.Client`) section with cmdlet examples to README | `README.md` | | #5108 | Add missing `resume` experimental feature to the settings JSON schema | `schemas/JSON/settings/settings.schema.0.2.json` | | #4372 | Add AppInstaller reset/repair commands (Win10 & Win11) to troubleshooting guide | `doc/troubleshooting/README.md` | | #5867 | Fix broken `aka.ms/winget-dsc-resources` help link that redirects to Bing | `src/AppInstallerCLICore/Commands/DscCommand.cpp` | ### Details - **Settings.md (#5296):** The `downloadBehavior` section with `defaultDownloadDirectory` was already defined in the settings schema (`settings.schema.0.2.json`) but was not documented in `doc/Settings.md`. Added it between Configure Behavior and Telemetry sections. - **README.md (#5921):** Added a new **PowerShell Module** section showing how to install `Microsoft.WinGet.Client` from the PowerShell Gallery and example cmdlet usage (`Find-WinGetPackage`, `Install-WinGetPackage`, `Get-WinGetPackage`, `Update-WinGetPackage`, `Repair-WinGetPackageManager`). - **Settings schema (#5108):** The `resume` experimental feature was documented in `Settings.md` but missing from the JSON schema. Added it alongside the existing experimental features. (The other items from the original issue — `archiveExtractionMethod` and `fonts` — have already been fixed.) - **Troubleshooting (#4372):** Added step 5 with PowerShell commands to reset the App Installer package when it's in a broken state, with separate commands for Windows 10 and Windows 11. - **DSC help link (#5867):** The `https://aka.ms/winget-dsc-resources` URL in `DscCommand.cpp` redirects to Bing's home page. Updated it to point to the WinGet Configuration documentation on Microsoft Learn. Fixes #5296, #5921, #5108, #4372, #5867 ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/winget-cli/pull/6110) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 9659f5a commit b08db2a

5 files changed

Lines changed: 54 additions & 1 deletion

File tree

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,35 @@ The same Microsoft Store package will be made available via our [Releases](https
4343

4444
Please read our [troubleshooting guide](/doc/troubleshooting/README.md).
4545

46+
## PowerShell Module
47+
48+
The [Microsoft.WinGet.Client](https://www.powershellgallery.com/packages/Microsoft.WinGet.Client/) PowerShell module provides native cmdlets for interacting with the Windows Package Manager. You can install it from the PowerShell Gallery:
49+
50+
```powershell
51+
Install-Module -Name Microsoft.WinGet.Client
52+
```
53+
54+
Example usage:
55+
56+
```powershell
57+
# Search for a package
58+
Find-WinGetPackage -Query "Visual Studio Code"
59+
60+
# Install a package
61+
Install-WinGetPackage -Id Microsoft.VisualStudioCode
62+
63+
# List installed packages
64+
Get-WinGetPackage
65+
66+
# Update a package
67+
Update-WinGetPackage -Id Microsoft.VisualStudioCode
68+
69+
# Repair the WinGet package manager installation
70+
Repair-WinGetPackageManager
71+
```
72+
73+
For more information, see the [Microsoft.WinGet.Client](https://www.powershellgallery.com/packages/Microsoft.WinGet.Client/) page on the PowerShell Gallery.
74+
4675
## Administrator Considerations
4776

4877
Installer behavior can be different depending on whether you are running **WinGet** with administrator privileges.

doc/Settings.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,22 @@ The `defaultModuleRoot` behavior affects the default root directory where module
248248
},
249249
```
250250

251+
## Download Behavior
252+
253+
The `downloadBehavior` settings affect the default behavior of downloading packages.
254+
255+
### Default Download Directory
256+
257+
The `defaultDownloadDirectory` setting affects the default directory where installers are downloaded to. Defaults to `%USERPROFILE%/Downloads/` if value is not set or is invalid.
258+
259+
> Note: This setting value must be an absolute path.
260+
261+
```json
262+
"downloadBehavior": {
263+
"defaultDownloadDirectory": "C:/Users/FooBar/Downloads"
264+
},
265+
```
266+
251267
## Telemetry
252268

253269
The `telemetry` settings control whether winget writes ETW events that may be sent to Microsoft on a default installation of Windows.

doc/troubleshooting/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ These errors most commonly occur for one of following reasons. Please try out th
113113
1. Get the `PackageFullName` of your installed `App Installer` package (PowerShell): `Get-AppxPackage Microsoft.DesktopAppInstaller | Select Name, PackageFullName`.
114114
2. `Add-AppxPackage -register "C:\Program Files\WindowsApps\{PackageFullName}\appxmanifest.xml" -DisableDevelopmentMode` (where `{PackageFullName}` is the info from the previous point).
115115
3. Toggle the App Execution Alias for winget, again (see above).
116+
5. The App Installer package may be in a broken state. You can try resetting it using PowerShell:
117+
* On **Windows 11**: `Get-AppxPackage Microsoft.DesktopAppInstaller | Reset-AppxPackage`
118+
* On **Windows 10**: `$Manifest = (Get-AppxPackage Microsoft.DesktopAppInstaller).InstallLocation + '\appxmanifest.xml'; Add-AppxPackage -DisableDevelopmentMode -Register $Manifest`
116119

117120
If the above guidelines do not resolve the problem, please open an issue with details of the Windows version and App Installer version you are using.
118121

schemas/JSON/settings/settings.schema.0.2.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,11 @@
329329
"type": "boolean",
330330
"default": false
331331
},
332+
"resume": {
333+
"description": "Enable support for some commands to resume",
334+
"type": "boolean",
335+
"default": false
336+
},
332337
"sourcePriority": {
333338
"description": "Enable source priority feature",
334339
"type": "boolean",

src/AppInstallerCLICore/Commands/DscCommand.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ namespace AppInstaller::CLI
6464

6565
Utility::LocIndView DscCommand::HelpLink() const
6666
{
67-
return "https://aka.ms/winget-dsc-resources"_liv;
67+
return "https://learn.microsoft.com/windows/package-manager/configuration/"_liv;
6868
}
6969

7070
void DscCommand::ExecuteInternal(Execution::Context& context) const

0 commit comments

Comments
 (0)