Open o-l-a-v opened 4 months ago
As mentioned in https://github.com/microsoft/winget-cli/issues/4636#issuecomment-2227427928, the WinGet user settings JSON file is not a valid WinGet configuration file. I'm assuming from the issues you've opened that you're looking for a way to fetch / set WinGet user settings through PowerShell. For that, I would recommand the Microsoft.WinGet.Client
PowerShell module that contains cmdlets Get-WinGetUserSettings
and Set-WinGetUserSettings
~ Get-WinGetUserSettings
Name Value
---- -----
experimentalFeatures {[sideBySide, True], [configureExport, True]}
network {[downloader, wininet]}
visual {[progressBar, retro]}
$schema https://aka.ms/winget-settings.schema.json
~ Set-WinGetUserSettings -UserSettings @{ "network" = @{ "downloader" = "do" } }
Name Value
---- -----
$schema https://aka.ms/winget-settings.schema.json
network {[downloader, do]}
Keep in mind Set-WinGetUserSettings would erase all other settings if they're not specified.
[comment]: <[Policy] PowerShell> [comment]: <[Policy] Issue-Docs>
In some ways, this is more of "Make the package manager application and the package manager cmdlets operate in the same way."
Description of the new feature / enhancement
Microsoft.WinGet.Configuration
v1.8.1911-alpha: https://www.powershellgallery.com/packages/Microsoft.WinGet.Configuration/1.8.1911-alphaInstead of requiring input for
-Path
onGet-WinGetConfiguration
, default to the WinGet config default path, also opened bywinget config
?%LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
If you accept this change this should also be applied to other cmdlets getting or setting WinGet config.
Proposed technical implementation details
No response