From 7417b857e8152a0072b63b546635caf1409f22ba Mon Sep 17 00:00:00 2001 From: Muhammad Danish Date: Sat, 7 Jun 2025 08:58:10 +0500 Subject: [PATCH] Use Microsoft.Windows.Settings module for enabling developer mode (#39334) ## Summary of the Pull Request Using the [Microsoft.Windows.Settings](https://www.powershellgallery.com/packages/Microsoft.Windows.Settings/) module is the now the recommended way of configuring Windows Settings, including developer mode. ## PR Checklist - [ ] **Closes:** #xxx - [ ] **Communication:** I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end user facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx ## Detailed Description of the Pull Request / Additional comments ## Validation Steps Performed Verified that setting developer mode with the new resource works as intended --- .config/configuration.vsEnterprise.winget | 4 ++-- .config/configuration.vsProfessional.winget | 4 ++-- .config/configuration.winget | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.config/configuration.vsEnterprise.winget b/.config/configuration.vsEnterprise.winget index 4d19d37137..08c9983562 100644 --- a/.config/configuration.vsEnterprise.winget +++ b/.config/configuration.vsEnterprise.winget @@ -2,14 +2,14 @@ # Reference: https://github.com/microsoft/PowerToys/blob/main/doc/devdocs/readme.md#compiling-powertoys properties: resources: - - resource: Microsoft.Windows.Developer/DeveloperMode + - resource: Microsoft.Windows.Settings/WindowsSettings directives: description: Enable Developer Mode allowPrerelease: true # Requires elevation for the set operation securityContext: elevated settings: - Ensure: Present + DeveloperMode: true - resource: Microsoft.WinGet.DSC/WinGetPackage id: vsPackage directives: diff --git a/.config/configuration.vsProfessional.winget b/.config/configuration.vsProfessional.winget index 78fb1c13d5..4d7e4a31c3 100644 --- a/.config/configuration.vsProfessional.winget +++ b/.config/configuration.vsProfessional.winget @@ -2,14 +2,14 @@ # Reference: https://github.com/microsoft/PowerToys/blob/main/doc/devdocs/readme.md#compiling-powertoys properties: resources: - - resource: Microsoft.Windows.Developer/DeveloperMode + - resource: Microsoft.Windows.Settings/WindowsSettings directives: description: Enable Developer Mode allowPrerelease: true # Requires elevation for the set operation securityContext: elevated settings: - Ensure: Present + DeveloperMode: true - resource: Microsoft.WinGet.DSC/WinGetPackage id: vsPackage directives: diff --git a/.config/configuration.winget b/.config/configuration.winget index 456eca47f2..2016dcdc33 100644 --- a/.config/configuration.winget +++ b/.config/configuration.winget @@ -2,14 +2,14 @@ # Reference: https://github.com/microsoft/PowerToys/blob/main/doc/devdocs/readme.md#compiling-powertoys properties: resources: - - resource: Microsoft.Windows.Developer/DeveloperMode + - resource: Microsoft.Windows.Settings/WindowsSettings directives: description: Enable Developer Mode allowPrerelease: true # Requires elevation for the set operation securityContext: elevated settings: - Ensure: Present + DeveloperMode: true - resource: Microsoft.WinGet.DSC/WinGetPackage id: vsPackage directives: