From ad37371492265ae7cbb89222866e94facd0d7c84 Mon Sep 17 00:00:00 2001 From: MyDrift Date: Tue, 10 Sep 2024 03:14:22 +0200 Subject: [PATCH] Add Legacy Print Panel (#2659) * add legacy print panel * fix documentation - run generator - add link to button - add documentation for printer - update table of contents * fix spelling --- config/feature.json | 8 + .../features/Legacy-Windows-Panels/printer.md | 65 +++++++ docs/devdocs.md | 173 +++++++++--------- functions/public/Invoke-WPFButton.ps1 | 1 + functions/public/Invoke-WPFControlPanel.ps1 | 1 + 5 files changed, 161 insertions(+), 87 deletions(-) create mode 100644 docs/dev/features/Legacy-Windows-Panels/printer.md diff --git a/config/feature.json b/config/feature.json index f28a92ed..0013b211 100644 --- a/config/feature.json +++ b/config/feature.json @@ -282,6 +282,14 @@ "ButtonWidth": "300", "link": "https://christitustech.github.io/winutil/dev/features/Legacy-Windows-Panels/sound" }, + "WPFPanelprinter": { + "Content": "Printer Panel", + "category": "Legacy Windows Panels", + "panel": "2", + "Type": "Button", + "ButtonWidth": "300", + "link": "https://christitustech.github.io/winutil/dev/features/Legacy-Windows-Panels/printer" + }, "WPFPanelsystem": { "Content": "System Properties", "category": "Legacy Windows Panels", diff --git a/docs/dev/features/Legacy-Windows-Panels/printer.md b/docs/dev/features/Legacy-Windows-Panels/printer.md new file mode 100644 index 00000000..05e3471a --- /dev/null +++ b/docs/dev/features/Legacy-Windows-Panels/printer.md @@ -0,0 +1,65 @@ +# Printer Settings + +Last Updated: 2024-08-31 + + +!!! info + The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.** + + + + + + +
+Preview Code + +```json +{ + "Content": "Printer Settings", + "category": "Legacy Windows Panels", + "panel": "2", + "Type": "Button", + "ButtonWidth": "300" +} +``` + +
+ +## Function: Invoke-WPFControlPanel + +```powershell +function Invoke-WPFControlPanel { + <# + + .SYNOPSIS + Opens the requested legacy panel + + .PARAMETER Panel + The panel to open + + #> + 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} + "WPFPanelprinter" {Start-Process "shell:::{A8A91A66-3A7D-4424-8D24-04E180695C7A}"} + "WPFPanelsystem" {cmd /c sysdm.cpl} + "WPFPaneluser" {cmd /c "control userpasswords2"} + } +} + +``` + + + + + + + +[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/../config/feature.json) + diff --git a/docs/devdocs.md b/docs/devdocs.md index 7efd5d62..2b9b0a30 100644 --- a/docs/devdocs.md +++ b/docs/devdocs.md @@ -3,107 +3,106 @@ ## Tweaks -### z--Advanced-Tweaks---CAUTION - -- [Adobe Debloat](dev/tweaks/z--Advanced-Tweaks---CAUTION/DebloatAdobe.md) -- [Adobe Network Block](dev/tweaks/z--Advanced-Tweaks---CAUTION/BlockAdobeNet.md) -- [Disable Background Apps](dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableBGapps.md) -- [Disable Fullscreen Optimizations](dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableFSO.md) -- [Disable Intel MM (vPro LMS)](dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableLMS1.md) -- [Disable IPv6](dev/tweaks/z--Advanced-Tweaks---CAUTION/Disableipsix.md) -- [Disable Microsoft Copilot](dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveCopilot.md) -- [Disable Notification Tray/Calendar](dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableNotifications.md) -- [Disable Teredo](dev/tweaks/z--Advanced-Tweaks---CAUTION/Teredo.md) -- [DNS](dev/tweaks/z--Advanced-Tweaks---CAUTION/changedns.md) -- [Remove ALL MS Store Apps - NOT RECOMMENDED](dev/tweaks/z--Advanced-Tweaks---CAUTION/DeBloat.md) -- [Remove Home and Gallery from explorer](dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveHomeGallery.md) -- [Remove Microsoft Edge](dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveEdge.md) -- [Remove OneDrive](dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveOnedrive.md) -- [Run OO Shutup 10](dev/tweaks/z--Advanced-Tweaks---CAUTION/OOSUbutton.md) -- [Run Tweaks](dev/tweaks/z--Advanced-Tweaks---CAUTION/button.md) -- [Set Classic Right-Click Menu ](dev/tweaks/z--Advanced-Tweaks---CAUTION/RightClickMenu.md) -- [Set Display for Performance](dev/tweaks/z--Advanced-Tweaks---CAUTION/Display.md) -- [Set Time to UTC (Dual Boot)](dev/tweaks/z--Advanced-Tweaks---CAUTION/UTC.md) -- [Undo Selected Tweaks](dev/tweaks/z--Advanced-Tweaks---CAUTION/Undoall.md) ### Essential-Tweaks -- [Change Windows Terminal default: PowerShell 5 -> PowerShell 7](dev/tweaks/Essential-Tweaks/Powershell7.md) -- [Create Restore Point](dev/tweaks/Essential-Tweaks/RestorePoint.md) -- [Debloat Edge](dev/tweaks/Essential-Tweaks/EdgeDebloat.md) -- [Delete Temporary Files](dev/tweaks/Essential-Tweaks/DeleteTempFiles.md) -- [Prefer IPv4 over IPv6](dev/tweaks/Essential-Tweaks/IPv46.md) -- [Disable Activity History](dev/tweaks/Essential-Tweaks/AH.md) -- [Disable ConsumerFeatures](dev/tweaks/Essential-Tweaks/ConsumerFeatures.md) -- [Disable GameDVR](dev/tweaks/Essential-Tweaks/DVR.md) -- [Disable Hibernation](dev/tweaks/Essential-Tweaks/Hiber.md) -- [Disable Homegroup](dev/tweaks/Essential-Tweaks/Home.md) -- [Disable Location Tracking](dev/tweaks/Essential-Tweaks/Loc.md) -- [Disable Powershell 7 Telemetry](dev/tweaks/Essential-Tweaks/Powershell7Tele.md) -- [Disable Storage Sense](dev/tweaks/Essential-Tweaks/Storage.md) -- [Disable Telemetry](dev/tweaks/Essential-Tweaks/Tele.md) -- [Disable Wifi-Sense](dev/tweaks/Essential-Tweaks/Wifi.md) -- [Enable End Task With Right Click](dev/tweaks/Essential-Tweaks/EndTaskOnTaskbar.md) -- [Run Disk Cleanup](dev/tweaks/Essential-Tweaks/DiskCleanup.md) -- [Set Hibernation as default (good for laptops)](dev/tweaks/Essential-Tweaks/LaptopHibernation.md) -- [Set Services to Manual](dev/tweaks/Essential-Tweaks/Services.md) +- [Change Windows Terminal default: PowerShell 5 -> PowerShell 7](../docs/dev/tweaks/Essential-Tweaks/Powershell7.md) +- [Create Restore Point](../docs/dev/tweaks/Essential-Tweaks/RestorePoint.md) +- [Debloat Edge](../docs/dev/tweaks/Essential-Tweaks/EdgeDebloat.md) +- [Delete Temporary Files](../docs/dev/tweaks/Essential-Tweaks/DeleteTempFiles.md) +- [Disable Activity History](../docs/dev/tweaks/Essential-Tweaks/AH.md) +- [Disable ConsumerFeatures](../docs/dev/tweaks/Essential-Tweaks/ConsumerFeatures.md) +- [Disable GameDVR](../docs/dev/tweaks/Essential-Tweaks/DVR.md) +- [Disable Hibernation](../docs/dev/tweaks/Essential-Tweaks/Hiber.md) +- [Disable Homegroup](../docs/dev/tweaks/Essential-Tweaks/Home.md) +- [Disable Location Tracking](../docs/dev/tweaks/Essential-Tweaks/Loc.md) +- [Disable Powershell 7 Telemetry](../docs/dev/tweaks/Essential-Tweaks/Powershell7Tele.md) +- [Disable Storage Sense](../docs/dev/tweaks/Essential-Tweaks/Storage.md) +- [Disable Telemetry](../docs/dev/tweaks/Essential-Tweaks/Tele.md) +- [Disable Wifi-Sense](../docs/dev/tweaks/Essential-Tweaks/Wifi.md) +- [Enable End Task With Right Click](../docs/dev/tweaks/Essential-Tweaks/EndTaskOnTaskbar.md) +- [Prefer IPv4 over IPv6](../docs/dev/tweaks/Essential-Tweaks/IPv46.md) +- [Run Disk Cleanup](../docs/dev/tweaks/Essential-Tweaks/DiskCleanup.md) +- [Set Hibernation as default (good for laptops)](../docs/dev/tweaks/Essential-Tweaks/LaptopHibernation.md) +- [Set Services to Manual](../docs/dev/tweaks/Essential-Tweaks/Services.md) ### Shortcuts -- [Create WinUtil Shortcut](dev/tweaks/Shortcuts/Shortcut.md) +- [Create WinUtil Shortcut](../docs/dev/tweaks/Shortcuts/Shortcut.md) +### z--Advanced-Tweaks---CAUTION + +- [Adobe Debloat](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/DebloatAdobe.md) +- [Adobe Network Block](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/BlockAdobeNet.md) +- [Disable Background Apps](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableBGapps.md) +- [Disable Fullscreen Optimizations](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableFSO.md) +- [Disable Intel MM (vPro LMS)](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableLMS1.md) +- [Disable IPv6](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/Disableipsix.md) +- [Disable Microsoft Copilot](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveCopilot.md) +- [Disable Notification Tray/Calendar](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableNotifications.md) +- [Disable Teredo](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/Teredo.md) +- [DNS](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/changedns.md) +- [Remove ALL MS Store Apps - NOT RECOMMENDED](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/DeBloat.md) +- [Remove Home and Gallery from explorer](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveHomeGallery.md) +- [Remove Microsoft Edge](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveEdge.md) +- [Remove OneDrive](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveOnedrive.md) +- [Run OO Shutup 10](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/OOSUbutton.md) +- [Set Classic Right-Click Menu ](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/RightClickMenu.md) +- [Set Display for Performance](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/Display.md) +- [Set Time to UTC (Dual Boot)](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/UTC.md) ### Customize-Preferences -- [Bing Search in Start Menu](dev/tweaks/Customize-Preferences/BingSearch.md) -- [Center Taskbar Items](dev/tweaks/Customize-Preferences/TaskbarAlignment.md) -- [Dark Theme for Windows](dev/tweaks/Customize-Preferences/DarkMode.md) -- [Detailed BSoD](dev/tweaks/Customize-Preferences/DetailedBSoD.md) -- [Mouse Acceleration](dev/tweaks/Customize-Preferences/MouseAcceleration.md) -- [NumLock on Startup](dev/tweaks/Customize-Preferences/NumLock.md) -- [Search Button in Taskbar](dev/tweaks/Customize-Preferences/TaskbarSearch.md) -- [Show File Extensions](dev/tweaks/Customize-Preferences/ShowExt.md) -- [Show Hidden Files](dev/tweaks/Customize-Preferences/HiddenFiles.md) -- [Snap Assist Flyout](dev/tweaks/Customize-Preferences/SnapFlyout.md) -- [Snap Assist Suggestion](dev/tweaks/Customize-Preferences/SnapSuggestion.md) -- [Snap Window](dev/tweaks/Customize-Preferences/SnapWindow.md) -- [Sticky Keys](dev/tweaks/Customize-Preferences/StickyKeys.md) -- [Task View Button in Taskbar](dev/tweaks/Customize-Preferences/TaskView.md) -- [Verbose Messages During Logon](dev/tweaks/Customize-Preferences/VerboseLogon.md) -- [Widgets Button in Taskbar](dev/tweaks/Customize-Preferences/TaskbarWidgets.md) +- [Bing Search in Start Menu](../docs/dev/tweaks/Customize-Preferences/BingSearch.md) +- [Center Taskbar Items](../docs/dev/tweaks/Customize-Preferences/TaskbarAlignment.md) +- [Dark Theme for Windows](../docs/dev/tweaks/Customize-Preferences/DarkMode.md) +- [Detailed BSoD](../docs/dev/tweaks/Customize-Preferences/DetailedBSoD.md) +- [Mouse Acceleration](../docs/dev/tweaks/Customize-Preferences/MouseAcceleration.md) +- [NumLock on Startup](../docs/dev/tweaks/Customize-Preferences/NumLock.md) +- [Search Button in Taskbar](../docs/dev/tweaks/Customize-Preferences/TaskbarSearch.md) +- [Show File Extensions](../docs/dev/tweaks/Customize-Preferences/ShowExt.md) +- [Show Hidden Files](../docs/dev/tweaks/Customize-Preferences/HiddenFiles.md) +- [Snap Assist Flyout](../docs/dev/tweaks/Customize-Preferences/SnapFlyout.md) +- [Snap Assist Suggestion](../docs/dev/tweaks/Customize-Preferences/SnapSuggestion.md) +- [Snap Window](../docs/dev/tweaks/Customize-Preferences/SnapWindow.md) +- [Sticky Keys](../docs/dev/tweaks/Customize-Preferences/StickyKeys.md) +- [Task View Button in Taskbar](../docs/dev/tweaks/Customize-Preferences/TaskView.md) +- [Verbose Messages During Logon](../docs/dev/tweaks/Customize-Preferences/VerboseLogon.md) +- [Widgets Button in Taskbar](../docs/dev/tweaks/Customize-Preferences/TaskbarWidgets.md) ### Performance-Plans -- [Add and Activate Ultimate Performance Profile](dev/tweaks/Performance-Plans/AddUltPerf.md) -- [Remove Ultimate Performance Profile](dev/tweaks/Performance-Plans/RemoveUltPerf.md) +- [Add and Activate Ultimate Performance Profile](../docs/dev/tweaks/Performance-Plans/AddUltPerf.md) +- [Remove Ultimate Performance Profile](../docs/dev/tweaks/Performance-Plans/RemoveUltPerf.md) ## Features -### Legacy-Windows-Panels - -- [Control Panel](dev/features/Legacy-Windows-Panels/control.md) -- [Network Connections](dev/features/Legacy-Windows-Panels/network.md) -- [Power Panel](dev/features/Legacy-Windows-Panels/power.md) -- [Region](dev/features/Legacy-Windows-Panels/region.md) -- [Sound Settings](dev/features/Legacy-Windows-Panels/sound.md) -- [System Properties](dev/features/Legacy-Windows-Panels/system.md) -- [User Accounts](dev/features/Legacy-Windows-Panels/user.md) ### Fixes -- [Remove Adobe Creative Cloud](dev/features/Fixes/RunAdobeCCCleanerTool.md) -- [Reset Network](dev/features/Fixes/Network.md) -- [Reset Windows Update](dev/features/Fixes/Update.md) -- [Set Up Autologin](dev/features/Fixes/Autologin.md) -- [System Corruption Scan](dev/features/Fixes/DISM.md) -- [WinGet Reinstall](dev/features/Fixes/Winget.md) +- [Remove Adobe Creative Cloud](../docs/dev/features/Fixes/RunAdobeCCCleanerTool.md) +- [Reset Network](../docs/dev/features/Fixes/Network.md) +- [Reset Windows Update](../docs/dev/features/Fixes/Update.md) +- [Set Up Autologin](../docs/dev/features/Fixes/Autologin.md) +- [System Corruption Scan](../docs/dev/features/Fixes/DISM.md) +- [WinGet Reinstall](../docs/dev/features/Fixes/Winget.md) +### Legacy-Windows-Panels + +- [Control Panel](../docs/dev/features/Legacy-Windows-Panels/control.md) +- [Network Connections](../docs/dev/features/Legacy-Windows-Panels/network.md) +- [Power Panel](../docs/dev/features/Legacy-Windows-Panels/power.md) +- [Printer Settings](../docs/dev/features/Legacy-Windows-Panels/printer.md) +- [Region](../docs/dev/features/Legacy-Windows-Panels/region.md) +- [Sound Settings](../docs/dev/features/Legacy-Windows-Panels/sound.md) +- [System Properties](../docs/dev/features/Legacy-Windows-Panels/system.md) +- [User Accounts](../docs/dev/features/Legacy-Windows-Panels/user.md) ### Features -- [All .Net Framework (2,3,4)](dev/features/Features/dotnet.md) -- [Disable Legacy F8 Boot Recovery](dev/features/Features/DisableLegacyRecovery.md) -- [Disable Search Box Web Suggestions in Registry(explorer restart)](dev/features/Features/DisableSearchSuggestions.md) -- [Enable Daily Registry Backup Task 12.30am](dev/features/Features/RegBackup.md) -- [Enable Legacy F8 Boot Recovery](dev/features/Features/EnableLegacyRecovery.md) -- [Enable Search Box Web Suggestions in Registry(explorer restart)](dev/features/Features/EnableSearchSuggestions.md) -- [HyperV Virtualization](dev/features/Features/hyperv.md) -- [Install Features](dev/features/Features/Install.md) -- [Legacy Media (WMP, DirectPlay)](dev/features/Features/legacymedia.md) -- [NFS - Network File System](dev/features/Features/nfs.md) -- [Windows Sandbox](dev/features/Features/Sandbox.md) -- [Windows Subsystem for Linux](dev/features/Features/wsl.md) +- [All .Net Framework (2,3,4)](../docs/dev/features/Features/dotnet.md) +- [Disable Legacy F8 Boot Recovery](../docs/dev/features/Features/DisableLegacyRecovery.md) +- [Disable Search Box Web Suggestions in Registry(explorer restart)](../docs/dev/features/Features/DisableSearchSuggestions.md) +- [Enable Daily Registry Backup Task 12.30am](../docs/dev/features/Features/RegBackup.md) +- [Enable Legacy F8 Boot Recovery](../docs/dev/features/Features/EnableLegacyRecovery.md) +- [Enable Search Box Web Suggestions in Registry(explorer restart)](../docs/dev/features/Features/EnableSearchSuggestions.md) +- [HyperV Virtualization](../docs/dev/features/Features/hyperv.md) +- [Install Features](../docs/dev/features/Features/Install.md) +- [Legacy Media (WMP, DirectPlay)](../docs/dev/features/Features/legacymedia.md) +- [NFS - Network File System](../docs/dev/features/Features/nfs.md) +- [Windows Sandbox](../docs/dev/features/Features/Sandbox.md) +- [Windows Subsystem for Linux](../docs/dev/features/Features/wsl.md) diff --git a/functions/public/Invoke-WPFButton.ps1 b/functions/public/Invoke-WPFButton.ps1 index e3015f09..65d07a04 100644 --- a/functions/public/Invoke-WPFButton.ps1 +++ b/functions/public/Invoke-WPFButton.ps1 @@ -41,6 +41,7 @@ function Invoke-WPFButton { "WPFPanelpower" {Invoke-WPFControlPanel -Panel $button} "WPFPanelregion" {Invoke-WPFControlPanel -Panel $button} "WPFPanelsound" {Invoke-WPFControlPanel -Panel $button} + "WPFPanelprinter" {Invoke-WPFControlPanel -Panel $button} "WPFPanelsystem" {Invoke-WPFControlPanel -Panel $button} "WPFPaneluser" {Invoke-WPFControlPanel -Panel $button} "WPFUpdatesdefault" {Invoke-WPFUpdatesdefault} diff --git a/functions/public/Invoke-WPFControlPanel.ps1 b/functions/public/Invoke-WPFControlPanel.ps1 index eb0fdb2a..b7a628e7 100644 --- a/functions/public/Invoke-WPFControlPanel.ps1 +++ b/functions/public/Invoke-WPFControlPanel.ps1 @@ -16,6 +16,7 @@ function Invoke-WPFControlPanel { "WPFPanelpower" {cmd /c powercfg.cpl} "WPFPanelregion" {cmd /c intl.cpl} "WPFPanelsound" {cmd /c mmsys.cpl} + "WPFPanelprinter" {Start-Process "shell:::{A8A91A66-3A7D-4424-8D24-04E180695C7A}"} "WPFPanelsystem" {cmd /c sysdm.cpl} "WPFPaneluser" {cmd /c "control userpasswords2"} }