Improve documentation for building WinGet Configuration Files #5007
Labels
Command-Configure
Issue related to WinGet Configuration
Issue-Docs
It's a documentation issue that really should be on MicrosoftDocs
Brief description of your issue
From @cinnamon-msft
Hey Demitrius!
I created a DSC last night to start off the "presenter mode" defaults we'd want: https://github.com/cinnamon-msft/winget-dsc/blob/main/presenter.dsc.yaml
At the bottom of the file in comments are the rest of the settings I think we'd want to get lit up.
I took notes on the stuff I tried in order to get this working, figured these could be helpful:
Goal: Create DSC file for Windows settings, be able to list the available options in a module
Went to docs site: https://learn.microsoft.com/en-us/windows/package-manager/configuration/create
Started with winget configure command
Looked in FE for folder of modules
Didn't find a "configuration" folder in %localappdata%/Microsoft/WinGet
Went back to docs
Went to PowerShell gallery to get module for Windows settings (I know the name from the sample)
Installed Microsoft.Windows.Developer PowerShell module: Install-Module -Name Microsoft.Windows.Developer -AllowPrerelease
Got a warning saying this module is already installed
Tried winget configure again, clicked on aka.ms link
Went back to docs, clicked on "DSC resource"
Ran Get-DscResource -Syntax Microsoft.Windows.Developer, got error saying it's not recognized as the name of a resource
Ran Find-DscResource, got huge long output
Used Terminal's search to look for "Developer", got nothing in the long list
Finally realized I was on PowerShell DSC resource docs and not winget
Found DSC resources list on PowerShell module page: https://www.powershellgallery.com/packages/Microsoft.Windows.Developer/0.2.2-alpha
Went to winget-cli repo to find anything about listing the module options
Finally found the command from this comment in Dev Home's: https://github.com/microsoft/devhome/issues/2760#issuecomment-2086965784
Guessed at syntax for resource: Microsoft.Windows.Developer/Taskbar.WidgetsButton
Tested file with winget configure test -f C:\Users\cinnamon\GitHub\winget-dsc\presenter.dsc.yaml
Got an error message saying the WidgetsButton failed
Went back to Ryan's comment on the GitHub issue to see more details about the WidgetsButton properties
Okay that didn't help much
Compared to "Alignment" setting in this file for the Taskbar: https://github.com/microsoft/devhome/blob/aca7c203676137cc8ee9fd0c580d20310d5e73e1/docs/sampleConfigurations/DscResources/Microsoft.Windows.Developer/EnableWindowsSettings.yaml
Rewrote syntax, testing again
Got the same error as before
Tried new syntax and tested again, same error
Ended up having error where because I pre-installed Microsoft.Windows.Developer I was getting a multiple module instance error
Deleted both instances of the module (v0.1.3-alpha and v0.2.2-alpha) from my PowerShell modules folder
Then was successfully able to run it
The text was updated successfully, but these errors were encountered: