From 661dfa6318a3e991703504f31246d46a4e80ab95 Mon Sep 17 00:00:00 2001 From: MyDrift Date: Thu, 26 Jun 2025 20:23:33 +0200 Subject: [PATCH] add computer management + remove bloat from WPFControlPanel (#3431) --- config/feature.json | 8 ++++++++ functions/public/Invoke-WPFButton.ps1 | 1 + functions/public/Invoke-WPFControlPanel.ps1 | 15 ++++++++------- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/config/feature.json b/config/feature.json index 6a2dda4a..4021d51b 100644 --- a/config/feature.json +++ b/config/feature.json @@ -258,6 +258,14 @@ "ButtonWidth": "300", "link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/control" }, + "WPFPanelcomputer": { + "Content": "Computer Management", + "category": "Legacy Windows Panels", + "panel": "2", + "Type": "Button", + "ButtonWidth": "300", + "link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/computer" + }, "WPFPanelpower": { "Content": "Power Panel", "category": "Legacy Windows Panels", diff --git a/functions/public/Invoke-WPFButton.ps1 b/functions/public/Invoke-WPFButton.ps1 index 140acecd..4d5cf19e 100644 --- a/functions/public/Invoke-WPFButton.ps1 +++ b/functions/public/Invoke-WPFButton.ps1 @@ -35,6 +35,7 @@ function Invoke-WPFButton { "WPFFeatureInstall" {Invoke-WPFFeatureInstall} "WPFPanelDISM" {Invoke-WPFSystemRepair} "WPFPanelAutologin" {Invoke-WPFPanelAutologin} + "WPFPanelcomputer" {Invoke-WPFControlPanel -Panel $button} "WPFPanelcontrol" {Invoke-WPFControlPanel -Panel $button} "WPFPanelnetwork" {Invoke-WPFControlPanel -Panel $button} "WPFPanelpower" {Invoke-WPFControlPanel -Panel $button} diff --git a/functions/public/Invoke-WPFControlPanel.ps1 b/functions/public/Invoke-WPFControlPanel.ps1 index 6196f6ef..9f95c386 100644 --- a/functions/public/Invoke-WPFControlPanel.ps1 +++ b/functions/public/Invoke-WPFControlPanel.ps1 @@ -11,14 +11,15 @@ function Invoke-WPFControlPanel { param($Panel) switch ($Panel) { - "WPFPanelcontrol" {cmd /c control} - "WPFPanelnetwork" {cmd /c ncpa.cpl} - "WPFPanelpower" {cmd /c powercfg.cpl} - "WPFPanelregion" {cmd /c intl.cpl} - "WPFPanelsound" {cmd /c mmsys.cpl} + "WPFPanelcontrol" {control} + "WPFPanelcomputer" {compmgmt.msc} + "WPFPanelnetwork" {ncpa.cpl} + "WPFPanelpower" {powercfg.cpl} + "WPFPanelregion" {intl.cpl} + "WPFPanelsound" {mmsys.cpl} "WPFPanelprinter" {Start-Process "shell:::{A8A91A66-3A7D-4424-8D24-04E180695C7A}"} - "WPFPanelsystem" {cmd /c sysdm.cpl} - "WPFPaneluser" {cmd /c "control userpasswords2"} + "WPFPanelsystem" {sysdm.cpl} + "WPFPaneluser" {control userpasswords2} "WPFPanelGodMode" {Start-Process "shell:::{ED7BA470-8E54-465E-825C-99712043E01C}"} } }