Compare commits

...

6 Commits

Author SHA1 Message Date
Gabi
08b24c7187 Change 'Get Installed' to 'Show Installed Apps' (#4027)
* Update appnavigation.json

* Update _index.md

* Update inputXML.xaml

* Update Invoke-WinUtilCurrentSystem.ps1

* Update Invoke-WinUtilCurrentSystem.ps1
2026-02-12 14:37:11 -06:00
KamaleiZestri
5fcc288037 Disable Sticky Keys shortcut added to toggle (#4028)
* disable sticky keys shortcut

* Merge branch 'main' into sticky
2026-02-12 14:36:17 -06:00
Gabi
8e8b0bb296 Make WPFToggleTaskbarAlignment restart explorer (#4034) 2026-02-12 14:35:31 -06:00
Eren
be8d20d478 export and import toggle switch states in config JSON (#4037)
* feat: add support for importing and exporting WPFToggle checkbox states.

* feat: add export and import

* remove unnecessary buttons from tweaks tab

* Merge branch 'main' into feature/import-export

* Merge branch 'main' into feature/import-export
2026-02-12 14:34:28 -06:00
Sean (ANGRYxScotsman)
9b03b94435 more winutil website update and new features (#4030)
* updated theme to the latest version

* Update en.yaml

* removed all the order from the docs

* add the store link

* update homepage

* add filename and line number to all the code blocks and also removed pages

* auto pull the code from the json files

* Merge branch 'main' into winutil-new-features

* the script updated linenostart=

* Delete LaptopHibernation.md
2026-02-12 14:33:11 -06:00
Eren
9d841687e3 Fix winget package uninstallation issues (#4036)
* refactor: refine Program parameter type to string

* refactor: rename `Invoke-WPFRunspace` parameter `ArgumentList` to `ParameterList`
2026-02-12 13:52:09 -06:00
101 changed files with 1080 additions and 970 deletions

View File

@@ -6,6 +6,9 @@ on:
- main
paths:
- "docs/**"
- "config/tweaks.json"
- "config/feature.json"
- "functions/**"
workflow_dispatch:
permissions:
@@ -42,6 +45,11 @@ jobs:
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Generate Dev Docs from JSON
shell: pwsh
run: |
Set-Location tools
./devdocs-generator.ps1
- name: Install Node.js dependencies
run: "cd docs && [[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
- name: Cache Restore

View File

@@ -60,7 +60,7 @@
"Description": "Clear the selection of applications"
},
"WPFGetInstalled": {
"Content": "Get Installed",
"Content": "Show Installed Apps",
"Category": "__Selection",
"Type": "Button",
"Order": "4",

View File

@@ -112,7 +112,7 @@
"Order": "a019_",
"feature": [],
"InvokeScript": [
"bcdedit /set bootmenupolicy standard"
"bcdedit /set bootmenupolicy standard"
],
"link": "https://winutil.christitus.com/dev/features/features/disablelegacyrecovery"
},
@@ -252,7 +252,7 @@
"panel": "2",
"Type": "Button",
"ButtonWidth": "300",
"link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/user"
"link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/sound"
},
"WPFPanelSystem": {
"Content": "System Properties",
@@ -276,7 +276,8 @@
"panel": "2",
"Order": "a083_",
"Type": "Button",
"ButtonWidth": "300"
"ButtonWidth": "300",
"link": "https://winutil.christitus.com/dev/features/powershell-profile-powershell-7--only/installpsprofile"
},
"WPFWinUtilUninstallPSProfile": {
"Content": "Uninstall CTT PowerShell Profile",
@@ -284,7 +285,8 @@
"panel": "2",
"Order": "a084_",
"Type": "Button",
"ButtonWidth": "300"
"ButtonWidth": "300",
"link": "https://winutil.christitus.com/dev/features/powershell-profile-powershell-7--only/uninstallpsprofile"
},
"WPFWinUtilSSHServer": {
"Content": "Enable OpenSSH Server",
@@ -292,6 +294,7 @@
"panel": "2",
"Order": "a084_",
"Type": "Button",
"ButtonWidth": "300"
"ButtonWidth": "300",
"link": "https://winutil.christitus.com/dev/features/remote-access/sshserver"
}
}

View File

@@ -56,7 +56,7 @@
"UndoScript": [
"powercfg.exe /hibernate on"
],
"link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/hibernation"
"link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/hiber"
},
"WPFTweaksWidget": {
"Content": "Remove Widgets",
@@ -80,7 +80,55 @@
Invoke-WinUtilExplorerUpdate -action \"restart\"
"
],
"link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/widgets"
"link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/widget"
},
"WPFTweaksLaptopHibernation": {
"Content": "Set Hibernation as default (good for laptops)",
"Description": "Most modern laptops have connected standby enabled which drains the battery, this sets hibernation as default which will not drain the battery. See issue https://github.com/ChrisTitusTech/winutil/issues/1399",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"Order": "a030_",
"registry": [
{
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Power\\PowerSettings\\238C9FA8-0AAD-41ED-83F4-97BE242C8F20\\7bc4a2f9-d8fc-4469-b07b-33eb785aaca0",
"OriginalValue": "1",
"Name": "Attributes",
"Value": "2",
"Type": "DWord"
},
{
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Power\\PowerSettings\\abfc2519-3608-4c2a-94ea-171b0ed546ab\\94ac6d29-73ce-41a6-809f-6363ba21b47e",
"OriginalValue": "0",
"Name": "Attributes ",
"Value": "2",
"Type": "DWord"
}
],
"InvokeScript": [
"
Write-Host \"Turn on Hibernation\"
powercfg.exe /hibernate on
# Set hibernation as the default action
powercfg.exe change standby-timeout-ac 60
powercfg.exe change standby-timeout-dc 60
powercfg.exe change monitor-timeout-ac 10
powercfg.exe change monitor-timeout-dc 1
"
],
"UndoScript": [
"
Write-Host \"Turn off Hibernation\"
powercfg.exe /hibernate off
# Set standby to default values
powercfg.exe change standby-timeout-ac 15
powercfg.exe change standby-timeout-dc 15
powercfg.exe change monitor-timeout-ac 15
powercfg.exe change monitor-timeout-dc 15
"
],
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/laptophibernation"
},
"WPFTweaksLocation": {
"Content": "Disable Location Tracking",
@@ -1090,7 +1138,7 @@
"panel": "1",
"registry": [
{
"Path":"HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave",
"Path": "HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave",
"Name": "BraveRewardsDisabled",
"Type": "DWord",
"Value": "1",
@@ -1125,7 +1173,7 @@
"OriginalValue": "<RemoveEntry>"
}
],
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/bravedebloat/"
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/bravedebloat"
},
"WPFTweaksEdgeDebloat": {
"Content": "Edge Debloat",
@@ -1763,7 +1811,7 @@
"OriginalValue": "1"
}
],
"link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/storage"
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/storage"
},
"WPFTweaksRemoveCopilot": {
"Content": "Disable Microsoft Copilot",
@@ -2023,7 +2071,7 @@
"Type": "DWord"
}
],
"link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/ipv46"
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/ipv46"
},
"WPFTweaksTeredo": {
"Content": "Disable Teredo",
@@ -2247,7 +2295,7 @@
Invoke-WinUtilExplorerUpdate -action \"restart\"
"
],
"link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/wpftogglestartmenurecommendations"
"link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/startmenurecommendations"
},
"WPFToggleHideSettingsHome": {
"Content": "Remove Settings Home Page",
@@ -2264,7 +2312,8 @@
"OriginalValue": "show:home",
"DefaultState": "false"
}
]
],
"link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/hidesettingshome"
},
"WPFToggleMouseAcceleration": {
"Content": "Mouse Acceleration",
@@ -2310,7 +2359,7 @@
{
"Path": "HKCU:\\Control Panel\\Accessibility\\StickyKeys",
"Name": "Flags",
"Value": "510",
"Value": "506",
"OriginalValue": "58",
"DefaultState": "true",
"Type": "DWord"
@@ -2360,7 +2409,6 @@
],
"link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/newoutlook"
},
"WPFToggleMultiplaneOverlay": {
"Content": "Disable Multiplane Overlay",
"Description": "Disable the Multiplane Overlay which can sometimes cause issues with Graphics Cards.",
@@ -2377,7 +2425,7 @@
"Type": "DWord"
}
],
"link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/multplaneoverlay"
"link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/multiplaneoverlay"
},
"WPFToggleHiddenFiles": {
"Content": "Show Hidden Files",
@@ -2487,6 +2535,11 @@
"Type": "DWord"
}
],
"InvokeScript": [
"
Invoke-WinUtilExplorerUpdate -action \"restart\"
"
],
"link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/taskbaralignment"
},
"WPFToggleDetailedBSoD": {
@@ -2530,7 +2583,8 @@
"DefaultState": "false",
"Type": "DWord"
}
]
],
"link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/s3sleep"
},
"WPFOOSUbutton": {
"Content": "Run OO Shutup 10",
@@ -2615,7 +2669,8 @@
Write-Host Please sign out and back in, or restart your computer to apply the changes!
"
]
],
"link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/disableexplorerautodiscovery"
},
"WPFToggleDisableCrossDeviceResume": {
"Content": "Cross-Device Resume",
@@ -2632,6 +2687,7 @@
"DefaultState": "true",
"Type": "DWord"
}
]
],
"link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/disablecrossdeviceresume"
}
}

View File

@@ -22,5 +22,5 @@ irm "https://christitus.com/win" | iex
```
> [!NOTE]
> [!IMPORTANT]
> Winutil is updated frequently as of the time of writing. Consequently, features and functionalities may evolve, and the documentation may not always reflect the most current images or information.

View File

@@ -194,7 +194,7 @@ Update UI
### applications.json Structure
```json
```json {filename="config/applications.json"}
{
"WPFInstall<AppName>": {
"category": "Browsers",
@@ -217,14 +217,13 @@ Update UI
### tweaks.json Structure
```json
```json {filename="config/tweaks.json"}
{
"WPFTweaksTelemetry": {
"Content": "Disable Telemetry",
"Description": "Disables Microsoft Telemetry",
"category": "Essential Tweaks",
"panel": "1",
"Order": "a003_",
"registry": [
{
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\DataCollection",
@@ -365,7 +364,7 @@ $sync.form.Dispatcher.Invoke([action]{
### Adding a New Application
1. Edit `config/applications.json`:
```json
```json {filename="config/applications.json"}
{
"WPFInstallNewApp": {
"category": "Utilities",
@@ -383,7 +382,7 @@ $sync.form.Dispatcher.Invoke([action]{
### Adding a New Tweak
1. Edit `config/tweaks.json`:
```json
```json {filename="config/tweaks.json"}
{
"WPFTweaksNewTweak": {
"Content": "New Tweak",

View File

@@ -2,7 +2,7 @@
title: "Disable Legacy F8 Boot Recovery"
description: ""
---
```json
```json {filename="config/feature.json",linenos=inline,linenostart=107}
"WPFFeatureDisableLegacyRecovery": {
"Content": "Disable Legacy F8 Boot Recovery",
"Description": "Disables Advanced Boot Options screen that lets you start Windows in advanced troubleshooting modes.",
@@ -11,6 +11,6 @@ description: ""
"Order": "a019_",
"feature": [],
"InvokeScript": [
"bcdedit /set bootmenupolicy standard"
"bcdedit /set bootmenupolicy standard"
],
```

View File

@@ -2,7 +2,7 @@
title: "Enable Legacy F8 Boot Recovery"
description: ""
---
```json
```json {filename="config/feature.json",linenos=inline,linenostart=95}
"WPFFeatureEnableLegacyRecovery": {
"Content": "Enable Legacy F8 Boot Recovery",
"Description": "Enables Advanced Boot Options screen that lets you start Windows in advanced troubleshooting modes.",

View File

@@ -2,8 +2,8 @@
title: "Enable Daily Registry Backup Task 12.30am"
description: ""
---
```json
"WPFFeatureRegBackup": {
```json {filename="config/feature.json",linenos=inline,linenostart=77}
"WPFFeatureRegBackup": {
"Content": "Enable Daily Registry Backup Task 12.30am",
"Description": "Enables daily registry backup, previously disabled by Microsoft in Windows 10 1803.",
"category": "Features",

View File

@@ -2,8 +2,8 @@
title: "Windows Sandbox"
description: ""
---
```json
"WPFFeaturesSandbox": {
```json {filename="config/feature.json",linenos=inline,linenostart=119}
"WPFFeaturesSandbox": {
"Content": "Windows Sandbox",
"Description": "Windows Sandbox is a lightweight virtual machine that provides a temporary desktop environment to safely run applications and programs in isolation.",
"category": "Features",

View File

@@ -2,8 +2,8 @@
title: "All .Net Framework (2,3,4)"
description: ""
---
```json
"WPFFeaturesdotnet": {
```json {filename="config/feature.json",linenos=inline,linenostart=2}
"WPFFeaturesdotnet": {
"Content": "All .Net Framework (2,3,4)",
"Description": ".NET and .NET Framework is a developer platform made up of tools, programming languages, and libraries for building many different types of applications.",
"category": "Features",
@@ -13,4 +13,5 @@ description: ""
"NetFx4-AdvSrvs",
"NetFx3"
],
"InvokeScript": [],
```

View File

@@ -2,8 +2,8 @@
title: "HyperV Virtualization"
description: ""
---
```json
"WPFFeatureshyperv": {
```json {filename="config/feature.json",linenos=inline,linenostart=15}
"WPFFeatureshyperv": {
"Content": "HyperV Virtualization",
"Description": "Hyper-V is a hardware virtualization product developed by Microsoft that allows users to create and manage virtual machines.",
"category": "Features",

View File

@@ -2,8 +2,8 @@
title: "Legacy Media (WMP, DirectPlay)"
description: ""
---
```json
"WPFFeatureslegacymedia": {
```json {filename="config/feature.json",linenos=inline,linenostart=29}
"WPFFeatureslegacymedia": {
"Content": "Legacy Media (WMP, DirectPlay)",
"Description": "Enables legacy programs from previous versions of windows",
"category": "Features",
@@ -15,4 +15,5 @@ description: ""
"DirectPlay",
"LegacyComponents"
],
"InvokeScript": [],
```

View File

@@ -2,8 +2,8 @@
title: "NFS - Network File System"
description: ""
---
```json
"WPFFeaturenfs": {
```json {filename="config/feature.json",linenos=inline,linenostart=57}
"WPFFeaturenfs": {
"Content": "NFS - Network File System",
"Description": "Network File System (NFS) is a mechanism for storing files on a network.",
"category": "Features",

View File

@@ -2,8 +2,8 @@
title: "Windows Subsystem for Linux"
description: ""
---
```json
"WPFFeaturewsl": {
```json {filename="config/feature.json",linenos=inline,linenostart=44}
"WPFFeaturewsl": {
"Content": "Windows Subsystem for Linux",
"Description": "Windows Subsystem for Linux is an optional feature of Windows that allows Linux programs to run natively on Windows without the need for a separate virtual machine or dual booting.",
"category": "Features",
@@ -13,4 +13,5 @@ description: ""
"VirtualMachinePlatform",
"Microsoft-Windows-Subsystem-Linux"
],
"InvokeScript": [],
```

View File

@@ -2,7 +2,7 @@
title: "Set Up Autologin"
description: ""
---
```powershell
```powershell {filename="functions/public/Invoke-WPFPanelAutologin.ps1",linenos=inline,linenostart=1}
function Invoke-WPFPanelAutologin {
<#

View File

@@ -2,7 +2,7 @@
title: "System Corruption Scan"
description: ""
---
```powershell
```powershell {filename="functions/public/Invoke-WPFSystemRepair.ps1",linenos=inline,linenostart=1}
function Invoke-WPFSystemRepair {
<#
.SYNOPSIS

View File

@@ -2,7 +2,7 @@
title: "Reset Network"
description: ""
---
```powershell
```powershell {filename="functions/public/Invoke-WPFFixesNetwork.ps1",linenos=inline,linenostart=1}
function Invoke-WPFFixesNetwork {
<#

View File

@@ -2,7 +2,7 @@
title: "Remove Adobe Creative Cloud"
description: ""
---
```powershell
```powershell {filename="functions/public/Invoke-WPFRunAdobeCCCleanerTool.ps1",linenos=inline,linenostart=1}
function Invoke-WPFRunAdobeCCCleanerTool {
<#
.SYNOPSIS

View File

@@ -2,7 +2,7 @@
title: "Reset Windows Update"
description: ""
---
```powershell
```powershell {filename="functions/public/Invoke-WPFFixesUpdate.ps1",linenos=inline,linenostart=1}
function Invoke-WPFFixesUpdate {
<#
@@ -229,5 +229,4 @@ function Invoke-WPFFixesUpdate {
Write-Progress -Id 9 -Activity "Starting Windows Update Services" -Completed
Write-Progress -Id 10 -Activity "Forcing discovery" -Completed
}
```

View File

@@ -2,7 +2,7 @@
title: "WinGet Reinstall"
description: ""
---
```powershell
```powershell {filename="functions/public/Invoke-WPFFixesWinget.ps1",linenos=inline,linenostart=1}
function Invoke-WPFFixesWinget {
<#

View File

@@ -0,0 +1,32 @@
---
title: "Computer Management"
description: ""
---
```powershell {filename="functions/public/Invoke-WPFControlPanel.ps1",linenos=inline,linenostart=1}
function Invoke-WPFControlPanel {
<#
.SYNOPSIS
Opens the requested legacy panel
.PARAMETER Panel
The panel to open
#>
param($Panel)
switch ($Panel) {
"WPFPanelControl" {control}
"WPFPanelComputer" {compmgmt.msc}
"WPFPanelNetwork" {ncpa.cpl}
"WPFPanelPower" {powercfg.cpl}
"WPFPanelPrinter" {Start-Process "shell:::{A8A91A66-3A7D-4424-8D24-04E180695C7A}"}
"WPFPanelRegion" {intl.cpl}
"WPFPanelRestore" {rstrui.exe}
"WPFPanelSound" {mmsys.cpl}
"WPFPanelSystem" {sysdm.cpl}
"WPFPanelTimedate" {timedate.cpl}
"WPFPanelUser" {control userpasswords2}
}
}
```

View File

@@ -0,0 +1,32 @@
---
title: "Windows Restore"
description: ""
---
```powershell {filename="functions/public/Invoke-WPFControlPanel.ps1",linenos=inline,linenostart=1}
function Invoke-WPFControlPanel {
<#
.SYNOPSIS
Opens the requested legacy panel
.PARAMETER Panel
The panel to open
#>
param($Panel)
switch ($Panel) {
"WPFPanelControl" {control}
"WPFPanelComputer" {compmgmt.msc}
"WPFPanelNetwork" {ncpa.cpl}
"WPFPanelPower" {powercfg.cpl}
"WPFPanelPrinter" {Start-Process "shell:::{A8A91A66-3A7D-4424-8D24-04E180695C7A}"}
"WPFPanelRegion" {intl.cpl}
"WPFPanelRestore" {rstrui.exe}
"WPFPanelSound" {mmsys.cpl}
"WPFPanelSystem" {sysdm.cpl}
"WPFPanelTimedate" {timedate.cpl}
"WPFPanelUser" {control userpasswords2}
}
}
```

View File

@@ -1,8 +1,8 @@
---
title: "User Accounts"
title: "Time and Date"
description: ""
---
```powershell
```powershell {filename="functions/public/Invoke-WPFControlPanel.ps1",linenos=inline,linenostart=1}
function Invoke-WPFControlPanel {
<#

View File

@@ -2,7 +2,7 @@
title: "Control Panel"
description: ""
---
```powershell
```powershell {filename="functions/public/Invoke-WPFControlPanel.ps1",linenos=inline,linenostart=1}
function Invoke-WPFControlPanel {
<#

View File

@@ -2,7 +2,7 @@
title: "Network Connections"
description: ""
---
```powershell
```powershell {filename="functions/public/Invoke-WPFControlPanel.ps1",linenos=inline,linenostart=1}
function Invoke-WPFControlPanel {
<#

View File

@@ -2,7 +2,7 @@
title: "Power Panel"
description: ""
---
```powershell
```powershell {filename="functions/public/Invoke-WPFControlPanel.ps1",linenos=inline,linenostart=1}
function Invoke-WPFControlPanel {
<#

View File

@@ -1,8 +1,8 @@
---
title: "Printer Settings"
title: "Printer Panel"
description: ""
---
```powershell
```powershell {filename="functions/public/Invoke-WPFControlPanel.ps1",linenos=inline,linenostart=1}
function Invoke-WPFControlPanel {
<#

View File

@@ -2,7 +2,7 @@
title: "Region"
description: ""
---
```powershell
```powershell {filename="functions/public/Invoke-WPFControlPanel.ps1",linenos=inline,linenostart=1}
function Invoke-WPFControlPanel {
<#

View File

@@ -2,7 +2,7 @@
title: "Sound Settings"
description: ""
---
```powershell
```powershell {filename="functions/public/Invoke-WPFControlPanel.ps1",linenos=inline,linenostart=1}
function Invoke-WPFControlPanel {
<#

View File

@@ -2,7 +2,7 @@
title: "System Properties"
description: ""
---
```powershell
```powershell {filename="functions/public/Invoke-WPFControlPanel.ps1",linenos=inline,linenostart=1}
function Invoke-WPFControlPanel {
<#

View File

@@ -2,13 +2,12 @@
title: "Bing Search in Start Menu"
description: ""
---
```json
"WPFToggleBingSearch": {
```json {filename="config/tweaks.json",linenos=inline,linenostart=2194}
"WPFToggleBingSearch": {
"Content": "Bing Search in Start Menu",
"Description": "If enable then includes web search results from Bing in your Start Menu search.",
"category": "Customize Preferences",
"panel": "2",
"Order": "a101_",
"Type": "Toggle",
"registry": [
{
@@ -23,6 +22,7 @@ description: ""
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -2,13 +2,12 @@
title: "Dark Theme for Windows"
description: ""
---
```json
"WPFToggleDarkMode": {
```json {filename="config/tweaks.json",linenos=inline,linenostart=2152}
"WPFToggleDarkMode": {
"Content": "Dark Theme for Windows",
"Description": "Enable/Disable Dark Mode.",
"category": "Customize Preferences",
"panel": "2",
"Order": "a100_",
"Type": "Toggle",
"registry": [
{
@@ -47,6 +46,7 @@ description: ""
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -2,13 +2,12 @@
title: "Detailed BSoD"
description: ""
---
```json
"WPFToggleDetailedBSoD": {
```json {filename="config/tweaks.json",linenos=inline,linenostart=2540}
"WPFToggleDetailedBSoD": {
"Content": "Detailed BSoD",
"Description": "If Enabled then you will see a detailed Blue Screen of Death (BSOD) with more information.",
"category": "Customize Preferences",
"panel": "2",
"Order": "a205_",
"Type": "Toggle",
"registry": [
{
@@ -31,6 +30,7 @@ description: ""
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -1,19 +1,18 @@
---
title: "Widgets Button in Taskbar"
title: "Cross-Device Resume"
description: ""
---
```json
"WPFToggleTaskbarWidgets": {
"Content": "Widgets Button in Taskbar",
"Description": "If Enabled then Widgets Button in Taskbar will be shown.",
```json {filename="config/tweaks.json",linenos=inline,linenostart=2670}
"WPFToggleDisableCrossDeviceResume": {
"Content": "Cross-Device Resume",
"Description": "This tweak controls the Resume function in Windows 11 24H2 and later, which allows you to resume an activity from a mobile device and vice-versa.",
"category": "Customize Preferences",
"panel": "2",
"Order": "a204_",
"Type": "Toggle",
"registry": [
{
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
"Name": "TaskbarDa",
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\CrossDeviceResume\\Configuration",
"Name": "IsResumeAllowed",
"Value": "1",
"OriginalValue": "0",
"DefaultState": "true",
@@ -23,6 +22,7 @@ description: ""
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -2,13 +2,12 @@
title: "Show Hidden Files"
description: ""
---
```json
"WPFToggleHiddenFiles": {
```json {filename="config/tweaks.json",linenos=inline,linenostart=2430}
"WPFToggleHiddenFiles": {
"Content": "Show Hidden Files",
"Description": "If Enabled then Hidden Files will be shown.",
"category": "Customize Preferences",
"panel": "2",
"Order": "a200_",
"Type": "Toggle",
"registry": [
{
@@ -33,6 +32,7 @@ description: ""
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -1,38 +1,28 @@
---
title: "Snap Assist Flyout"
title: "Remove Settings Home Page"
description: ""
---
```json
"WPFToggleSnapFlyout": {
"Content": "Snap Assist Flyout",
"Description": "If disabled then Snap preview is disabled when maximize button is hovered.",
```json {filename="config/tweaks.json",linenos=inline,linenostart=2300}
"WPFToggleHideSettingsHome": {
"Content": "Remove Settings Home Page",
"Description": "Removes the Home page in the Windows Settings app.",
"category": "Customize Preferences",
"panel": "2",
"Order": "a107_",
"Type": "Toggle",
"registry": [
{
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
"Name": "EnableSnapAssistFlyout",
"Value": "1",
"OriginalValue": "0",
"DefaultState": "true",
"Type": "DWord"
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",
"Name": "SettingsPageVisibility",
"Type": "String",
"Value": "hide:home",
"OriginalValue": "show:home",
"DefaultState": "false"
}
],
"InvokeScript": [
"
Invoke-WinUtilExplorerUpdate -action \"restart\"
"
],
"UndoScript": [
"
Invoke-WinUtilExplorerUpdate -action \"restart\"
"
],
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -2,13 +2,12 @@
title: "Mouse Acceleration"
description: ""
---
```json
"WPFToggleMouseAcceleration": {
```json {filename="config/tweaks.json",linenos=inline,linenostart=2318}
"WPFToggleMouseAcceleration": {
"Content": "Mouse Acceleration",
"Description": "If Enabled then Cursor movement is affected by the speed of your physical mouse movements.",
"category": "Customize Preferences",
"panel": "2",
"Order": "a109_",
"Type": "Toggle",
"registry": [
{
@@ -39,6 +38,7 @@ description: ""
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -0,0 +1,28 @@
---
title: "Disable Multiplane Overlay"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=2412}
"WPFToggleMultiplaneOverlay": {
"Content": "Disable Multiplane Overlay",
"Description": "Disable the Multiplane Overlay which can sometimes cause issues with Graphics Cards.",
"category": "Customize Preferences",
"panel": "2",
"Type": "Toggle",
"registry": [
{
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\Dwm",
"Name": "OverlayTestMode",
"Value": "5",
"OriginalValue": "<RemoveEntry>",
"DefaultState": "false",
"Type": "DWord"
}
],
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -0,0 +1,52 @@
---
title: "New Outlook"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=2370}
"WPFToggleNewOutlook": {
"Content": "New Outlook",
"Description": "If disabled it removes the toggle for new Outlook, disables the new Outlook migration and makes sure the Outlook Application actually uses the old Outlook.",
"category": "Customize Preferences",
"panel": "2",
"Type": "Toggle",
"registry": [
{
"Path": "HKCU:\\SOFTWARE\\Microsoft\\Office\\16.0\\Outlook\\Preferences",
"Name": "UseNewOutlook",
"Value": "1",
"OriginalValue": "0",
"DefaultState": "true",
"Type": "DWord"
},
{
"Path": "HKCU:\\Software\\Microsoft\\Office\\16.0\\Outlook\\Options\\General",
"Name": "HideNewOutlookToggle",
"Value": "0",
"OriginalValue": "1",
"DefaultState": "true",
"Type": "DWord"
},
{
"Path": "HKCU:\\Software\\Policies\\Microsoft\\Office\\16.0\\Outlook\\Options\\General",
"Name": "DoNewOutlookAutoMigration",
"Value": "0",
"OriginalValue": "0",
"DefaultState": "false",
"Type": "DWord"
},
{
"Path": "HKCU:\\Software\\Policies\\Microsoft\\Office\\16.0\\Outlook\\Preferences",
"Name": "NewOutlookMigrationUserSetting",
"Value": "0",
"OriginalValue": "<RemoveEntry>",
"DefaultState": "true",
"Type": "DWord"
}
],
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -2,13 +2,12 @@
title: "NumLock on Startup"
description: ""
---
```json
"WPFToggleNumLock": {
```json {filename="config/tweaks.json",linenos=inline,linenostart=2212}
"WPFToggleNumLock": {
"Content": "NumLock on Startup",
"Description": "Toggle the Num Lock key state when your computer starts.",
"category": "Customize Preferences",
"panel": "2",
"Order": "a102_",
"Type": "Toggle",
"registry": [
{
@@ -31,6 +30,7 @@ description: ""
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -1,28 +1,28 @@
---
title: "Snap Window"
title: "S3 Sleep"
description: ""
---
```json
"WPFToggleSnapWindow": {
"Content": "Snap Window",
"Description": "If enabled you can align windows by dragging them. | Relogin Required",
```json {filename="config/tweaks.json",linenos=inline,linenostart=2566}
"WPFToggleS3Sleep": {
"Content": "S3 Sleep",
"Description": "Toggles between Modern Standby and S3 sleep.",
"category": "Customize Preferences",
"panel": "2",
"Order": "a106_",
"Type": "Toggle",
"registry": [
{
"Path": "HKCU:\\Control Panel\\Desktop",
"Name": "WindowArrangementActive",
"Value": "1",
"OriginalValue": "0",
"DefaultState": "true",
"Type": "String"
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Power",
"Name": "PlatformAoAcOverride",
"Value": "0",
"OriginalValue": "<RemoveEntry>",
"DefaultState": "false",
"Type": "DWord"
}
],
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -2,13 +2,12 @@
title: "Show File Extensions"
description: ""
---
```json
"WPFToggleShowExt": {
```json {filename="config/tweaks.json",linenos=inline,linenostart=2458}
"WPFToggleShowExt": {
"Content": "Show File Extensions",
"Description": "If enabled then File extensions (e.g., .txt, .jpg) are visible.",
"category": "Customize Preferences",
"panel": "2",
"Order": "a201_",
"Type": "Toggle",
"registry": [
{
@@ -33,6 +32,7 @@ description: ""
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -1,38 +0,0 @@
---
title: "Snap Assist Suggestion"
description: ""
---
```json
"WPFToggleSnapSuggestion": {
"Content": "Snap Assist Suggestion",
"Description": "If enabled then you will get suggestions to snap other applications in the left over spaces.",
"category": "Customize Preferences",
"panel": "2",
"Order": "a108_",
"Type": "Toggle",
"registry": [
{
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
"Name": "SnapAssist",
"Value": "1",
"OriginalValue": "0",
"DefaultState": "true",
"Type": "DWord"
}
],
"InvokeScript": [
"
Invoke-WinUtilExplorerUpdate -action \"restart\"
"
],
"UndoScript": [
"
Invoke-WinUtilExplorerUpdate -action \"restart\"
"
],
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -0,0 +1,54 @@
---
title: "Recommendations in Start Menu"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=2256}
"WPFToggleStartMenuRecommendations": {
"Content": "Recommendations in Start Menu",
"Description": "If disabled then you will not see recommendations in the Start Menu.",
"category": "Customize Preferences",
"panel": "2",
"Type": "Toggle",
"registry": [
{
"Path": "HKLM:\\SOFTWARE\\Microsoft\\PolicyManager\\current\\device\\Start",
"Name": "HideRecommendedSection",
"Value": "0",
"OriginalValue": "1",
"DefaultState": "true",
"Type": "DWord"
},
{
"Path": "HKLM:\\SOFTWARE\\Microsoft\\PolicyManager\\current\\device\\Education",
"Name": "IsEducationEnvironment",
"Value": "0",
"OriginalValue": "1",
"DefaultState": "true",
"Type": "DWord"
},
{
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer",
"Name": "HideRecommendedSection",
"Value": "0",
"OriginalValue": "1",
"DefaultState": "true",
"Type": "DWord"
}
],
"InvokeScript": [
"
Invoke-WinUtilExplorerUpdate -action \"restart\"
"
],
"UndoScript": [
"
Invoke-WinUtilExplorerUpdate -action \"restart\"
"
],
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -2,13 +2,12 @@
title: "Sticky Keys"
description: ""
---
```json
"WPFToggleStickyKeys": {
```json {filename="config/tweaks.json",linenos=inline,linenostart=2352}
"WPFToggleStickyKeys": {
"Content": "Sticky Keys",
"Description": "If Enabled then Sticky Keys is activated - Sticky keys is an accessibility feature of some graphical user interfaces which assists users who have physical disabilities or help users reduce repetitive strain injury.",
"category": "Customize Preferences",
"panel": "2",
"Order": "a110_",
"Type": "Toggle",
"registry": [
{
@@ -23,6 +22,7 @@ description: ""
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -2,13 +2,12 @@
title: "Task View Button in Taskbar"
description: ""
---
```json
"WPFToggleTaskView": {
```json {filename="config/tweaks.json",linenos=inline,linenostart=2504}
"WPFToggleTaskView": {
"Content": "Task View Button in Taskbar",
"Description": "If Enabled then Task View Button in Taskbar will be shown.",
"category": "Customize Preferences",
"panel": "2",
"Order": "a203_",
"Type": "Toggle",
"registry": [
{
@@ -23,6 +22,7 @@ description: ""
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -2,13 +2,12 @@
title: "Center Taskbar Items"
description: ""
---
```json
"WPFToggleTaskbarAlignment": {
```json {filename="config/tweaks.json",linenos=inline,linenostart=2522}
"WPFToggleTaskbarAlignment": {
"Content": "Center Taskbar Items",
"Description": "[Windows 11] If Enabled then the Taskbar Items will be shown on the Center, otherwise the Taskbar Items will be shown on the Left.",
"category": "Customize Preferences",
"panel": "2",
"Order": "a204_",
"Type": "Toggle",
"registry": [
{
@@ -23,6 +22,7 @@ description: ""
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -2,13 +2,12 @@
title: "Search Button in Taskbar"
description: ""
---
```json
"WPFToggleTaskbarSearch": {
```json {filename="config/tweaks.json",linenos=inline,linenostart=2486}
"WPFToggleTaskbarSearch": {
"Content": "Search Button in Taskbar",
"Description": "If Enabled Search Button will be on the taskbar.",
"category": "Customize Preferences",
"panel": "2",
"Order": "a202_",
"Type": "Toggle",
"registry": [
{
@@ -23,6 +22,7 @@ description: ""
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -2,13 +2,12 @@
title: "Verbose Messages During Logon"
description: ""
---
```json
"WPFToggleVerboseLogon": {
```json {filename="config/tweaks.json",linenos=inline,linenostart=2238}
"WPFToggleVerboseLogon": {
"Content": "Verbose Messages During Logon",
"Description": "Show detailed messages during the login process for troubleshooting and diagnostics.",
"category": "Customize Preferences",
"panel": "2",
"Order": "a103_",
"Type": "Toggle",
"registry": [
{
@@ -23,6 +22,7 @@ description: ""
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -1,15 +1,13 @@
---
title: Activity History
title: "Disable Activity History"
description: ""
---
```json
```json {filename="config/tweaks.json",linenos=inline,linenostart=2}
"WPFTweaksActivity": {
"Content": "Disable Activity History",
"Description": "This erases recent docs, clipboard, and run history.",
"category": "Essential Tweaks",
"panel": "1",
"Order": "a005_",
"registry": [
{
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System",

View File

@@ -2,13 +2,12 @@
title: "Disable ConsumerFeatures"
description: ""
---
```json
```json {filename="config/tweaks.json",linenos=inline,linenostart=1299}
"WPFTweaksConsumerFeatures": {
"Content": "Disable ConsumerFeatures",
"Description": "Windows will not automatically install any games, third-party apps, or application links from the Windows Store for the signed-in user. Some default Apps will be inaccessible (eg. Phone Link)",
"category": "Essential Tweaks",
"panel": "1",
"Order": "a003_",
"registry": [
{
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\CloudContent",
@@ -21,6 +20,7 @@ description: ""
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -2,13 +2,12 @@
title: "Delete Temporary Files"
description: ""
---
```json
```json {filename="config/tweaks.json",linenos=inline,linenostart=2047}
"WPFTweaksDeleteTempFiles": {
"Content": "Delete Temporary Files",
"Description": "Erases TEMP Folders",
"category": "Essential Tweaks",
"panel": "1",
"Order": "a002_",
"InvokeScript": [
"
Remove-Item -Path \"$Env:Temp\\*\" -Recurse -Force

View File

@@ -0,0 +1,59 @@
---
title: "Disable Explorer Automatic Folder Discovery"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=2615}
"WPFTweaksDisableExplorerAutoDiscovery": {
"Content": "Disable Explorer Automatic Folder Discovery",
"Description": "Windows Explorer automatically tries to guess the type of the folder based on its contents, slowing down the browsing experience.",
"category": "Essential Tweaks",
"panel": "1",
"InvokeScript": [
"
# Previously detected folders
$bags = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\Bags\"
# Folder types lookup table
$bagMRU = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\BagMRU\"
# Flush Explorer view database
Remove-Item -Path $bags -Recurse -Force
Write-Host \"Removed $bags\"
Remove-Item -Path $bagMRU -Recurse -Force
Write-Host \"Removed $bagMRU\"
# Every folder
$allFolders = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\Bags\\AllFolders\\Shell\"
if (!(Test-Path $allFolders)) {
New-Item -Path $allFolders -Force
Write-Host \"Created $allFolders\"
}
# Generic view
New-ItemProperty -Path $allFolders -Name \"FolderType\" -Value \"NotSpecified\" -PropertyType String -Force
Write-Host \"Set FolderType to NotSpecified\"
Write-Host Please sign out and back in, or restart your computer to apply the changes!
"
],
"UndoScript": [
"
# Previously detected folders
$bags = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\Bags\"
# Folder types lookup table
$bagMRU = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\BagMRU\"
# Flush Explorer view database
Remove-Item -Path $bags -Recurse -Force
Write-Host \"Removed $bags\"
Remove-Item -Path $bagMRU -Recurse -Force
Write-Host \"Removed $bagMRU\"
Write-Host Please sign out and back in, or restart your computer to apply the changes!
"
],
```

View File

@@ -2,13 +2,12 @@
title: "Run Disk Cleanup"
description: ""
---
```json
```json {filename="config/tweaks.json",linenos=inline,linenostart=2034}
"WPFTweaksDiskCleanup": {
"Content": "Run Disk Cleanup",
"Description": "Runs Disk Cleanup on Drive C: and removes old Windows Updates.",
"category": "Essential Tweaks",
"panel": "1",
"Order": "a009_",
"InvokeScript": [
"
cleanmgr.exe /d C: /VERYLOWDISK

View File

@@ -2,13 +2,12 @@
title: "Enable End Task With Right Click"
description: ""
---
```json
```json {filename="config/tweaks.json",linenos=inline,linenostart=1771}
"WPFTweaksEndTaskOnTaskbar": {
"Content": "Enable End Task With Right Click",
"Description": "Enables option to end task when right clicking a program in the taskbar",
"category": "Essential Tweaks",
"panel": "1",
"Order": "a006_",
"registry": [
{
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\TaskbarDeveloperSettings",
@@ -21,6 +20,7 @@ description: ""
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -1,54 +0,0 @@
---
title: "Disable GameDVR"
description: ""
---
```json
"WPFTweaksDVR": {
"Content": "Disable GameDVR",
"Description": "GameDVR is a Windows App that is a dependency for some Store Games. I've never met someone that likes it, but it's there for the XBOX crowd.",
"category": "Essential Tweaks",
"panel": "1",
"Order": "a005_",
"registry": [
{
"Path": "HKCU:\\System\\GameConfigStore",
"Name": "GameDVR_FSEBehavior",
"Value": "2",
"OriginalValue": "1",
"Type": "DWord"
},
{
"Path": "HKCU:\\System\\GameConfigStore",
"Name": "GameDVR_Enabled",
"Value": "0",
"OriginalValue": "1",
"Type": "DWord"
},
{
"Path": "HKCU:\\System\\GameConfigStore",
"Name": "GameDVR_HonorUserFSEBehaviorMode",
"Value": "1",
"OriginalValue": "0",
"Type": "DWord"
},
{
"Path": "HKCU:\\System\\GameConfigStore",
"Name": "GameDVR_EFSEFeatureFlags",
"Value": "0",
"OriginalValue": "1",
"Type": "DWord"
},
{
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\GameDVR",
"Name": "AllowGameDVR",
"Value": "0",
"OriginalValue": "<RemoveEntry>",
"Type": "DWord"
}
],
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -2,13 +2,12 @@
title: "Disable Hibernation"
description: ""
---
```json
"WPFTweaksHiber": {
```json {filename="config/tweaks.json",linenos=inline,linenostart=32}
"WPFTweaksHiber": {
"Content": "Disable Hibernation",
"Description": "Hibernation is really meant for laptops as it saves what's in memory before turning the pc off. It really should never be used",
"category": "Essential Tweaks",
"panel": "1",
"Order": "a005_",
"registry": [
{
"Path": "HKLM:\\System\\CurrentControlSet\\Control\\Session Manager\\Power",
@@ -34,6 +33,7 @@ description: ""
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -2,13 +2,12 @@
title: "Disable Location Tracking"
description: ""
---
```json
"WPFTweaksLocation": {
```json {filename="config/tweaks.json",linenos=inline,linenostart=133}
"WPFTweaksLocation": {
"Content": "Disable Location Tracking",
"Description": "Disables Location Tracking...DUH!",
"category": "Essential Tweaks",
"panel": "1",
"Order": "a005_",
"registry": [
{
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\CapabilityAccessManager\\ConsentStore\\location",
@@ -42,6 +41,7 @@ description: ""
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -2,13 +2,12 @@
title: "Disable Powershell 7 Telemetry"
description: ""
---
```json
"WPFTweaksPowershell7Tele": {
```json {filename="config/tweaks.json",linenos=inline,linenostart=1787}
"WPFTweaksPowershell7Tele": {
"Content": "Disable Powershell 7 Telemetry",
"Description": "This will create an Environment Variable called 'POWERSHELL_TELEMETRY_OPTOUT' with a value of '1' which will tell Powershell 7 to not send Telemetry Data.",
"category": "Essential Tweaks",
"panel": "1",
"Order": "a005_",
"InvokeScript": [
"[Environment]::SetEnvironmentVariable('POWERSHELL_TELEMETRY_OPTOUT', '1', 'Machine')"
],

View File

@@ -2,14 +2,13 @@
title: "Create Restore Point"
description: ""
---
```json
"WPFTweaksRestorePoint": {
```json {filename="config/tweaks.json",linenos=inline,linenostart=1744}
"WPFTweaksRestorePoint": {
"Content": "Create Restore Point",
"Description": "Creates a restore point at runtime in case a revert is needed from WinUtil modifications",
"category": "Essential Tweaks",
"panel": "1",
"Checked": "False",
"Order": "a001_",
"registry": [
{
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SystemRestore",
@@ -30,3 +29,9 @@ description: ""
"
],
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -2,13 +2,12 @@
title: "Set Services to Manual"
description: ""
---
```json
"WPFTweaksServices": {
```json {filename="config/tweaks.json",linenos=inline,linenostart=170}
"WPFTweaksServices": {
"Content": "Set Services to Manual",
"Description": "Turns a bunch of system services to manual that don't need to be running all the time. This is pretty harmless as if the service is needed, it will simply start on demand.",
"category": "Essential Tweaks",
"panel": "1",
"Order": "a014_",
"service": [
{
"Name": "ALG",
@@ -522,7 +521,7 @@ description: ""
},
{
"Name": "TermService",
"StartupType": "Automatic",
"StartupType": "Manual",
"OriginalType": "Manual"
},
{
@@ -582,7 +581,7 @@ description: ""
},
{
"Name": "VaultSvc",
"StartupType": "Automatic",
"StartupType": "Manual",
"OriginalType": "Manual"
},
{
@@ -968,7 +967,7 @@ description: ""
],
```
#Function
```powershell
```powershell {filename="functions/private/Set-WinUtilService.ps1",linenos=inline,linenostart=1}
Function Set-WinUtilService {
<#

View File

@@ -2,13 +2,12 @@
title: "Disable Telemetry"
description: ""
---
```json
```json {filename="config/tweaks.json",linenos=inline,linenostart=1315}
"WPFTweaksTelemetry": {
"Content": "Disable Telemetry",
"Description": "Disables Microsoft Telemetry...Duh",
"category": "Essential Tweaks",
"panel": "1",
"Order": "a003_",
"registry": [
{
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\AdvertisingInfo",
@@ -109,7 +108,7 @@ description: ""
$Memory = (Get-CimInstance Win32_PhysicalMemory | Measure-Object Capacity -Sum).Sum / 1KB
Set-ItemProperty -Path \"HKLM:\\SYSTEM\\CurrentControlSet\\Control\" -Name SvcHostSplitThresholdInKB -Value $Memory
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Siuf\Rules" -Name "PeriodInNanoSeconds"
Remove-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Siuf\\Rules\" -Name PeriodInNanoSeconds
"
],
"UndoScript": [

View File

@@ -2,14 +2,12 @@
title: "Disable Windows Platform Binary Table (WPBT)"
description: ""
---
```json
```json {filename="config/tweaks.json",linenos=inline,linenostart=1901}
"WPFTweaksWPBT": {
"Content": "Disable Windows Platform Binary Table (WPBT)",
"Description": "If enabled then allows your computer vendor to execute a program each time it boots. It enables computer vendors to force install anti-theft software, software drivers, or a software program conveniently. This could also be a security risk.",
"category": "Essential Tweaks",
"panel": "1",
"Order": "a005_",
"registry": [
{
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager",

View File

@@ -2,14 +2,12 @@
title: "Remove Widgets"
description: ""
---
```json
```json {filename="config/tweaks.json",linenos=inline,linenostart=61}
"WPFTweaksWidget": {
"Content": "Remove Widgets",
"Description": "Removes the annoying widgets in the bottom left of the taskbar",
"category": "Essential Tweaks",
"panel": "1",
"Order": "a005_",
"InvokeScript": [
"
# Sometimes if you dont stop Widgets Process for removal to work

View File

@@ -0,0 +1,90 @@
---
title: "Add and Activate Ultimate Performance Profile"
description: ""
---
```powershell {filename="functions/public/Invoke-WPFUltimatePerformance.ps1",linenos=inline,linenostart=1}
Function Invoke-WPFUltimatePerformance {
<#
.SYNOPSIS
Enables or disables the Ultimate Performance power scheme based on its GUID.
.PARAMETER State
Specifies whether to "Enable" or "Disable" the Ultimate Performance power scheme.
#>
param(
[Parameter(Mandatory = $true)]
[ValidateSet("Enable", "Disable")]
[string]$State
)
try {
# GUID of the Ultimate Performance power plan
$ultimateGUID = "e9a42b02-d5df-448d-aa00-03f14749eb61"
switch ($State) {
"Enable" {
# Duplicate the Ultimate Performance power plan using its GUID
$duplicateOutput = powercfg /duplicatescheme $ultimateGUID
$guid = $null
$nameFromFile = "ChrisTitus - Ultimate Power Plan"
$description = "Ultimate Power Plan, added via WinUtils"
# Extract the new GUID from the duplicateOutput
foreach ($line in $duplicateOutput) {
if ($line -match "\b[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\b") {
$guid = $matches[0] # $matches[0] will contain the first match, which is the GUID
Write-Output "GUID: $guid has been extracted and stored in the variable."
break
}
}
if (-not $guid) {
Write-Output "No GUID found in the duplicateOutput. Check the output format."
exit 1
}
# Change the name of the power plan and set its description
$changeNameOutput = powercfg /changename $guid "$nameFromFile" "$description"
Write-Output "The power plan name and description have been changed. Output:"
Write-Output $changeNameOutput
# Set the duplicated Ultimate Performance plan as active
$setActiveOutput = powercfg /setactive $guid
Write-Output "The power plan has been set as active. Output:"
Write-Output $setActiveOutput
Write-Host "> Ultimate Performance plan installed and set as active."
}
"Disable" {
# Check if the Ultimate Performance plan is installed by GUID
$installedPlan = powercfg -list | Select-String -Pattern "ChrisTitus - Ultimate Power Plan"
if ($installedPlan) {
# Extract the GUID of the installed Ultimate Performance plan
$ultimatePlanGUID = $installedPlan.Line.Split()[3]
# Set a different power plan as active before deleting the Ultimate Performance plan
$balancedPlanGUID = "381b4222-f694-41f0-9685-ff5bb260df2e"
powercfg -setactive $balancedPlanGUID
# Delete the Ultimate Performance plan by GUID
powercfg -delete $ultimatePlanGUID
Write-Host "Ultimate Performance plan has been uninstalled."
Write-Host "> Balanced plan is now active."
} else {
Write-Host "Ultimate Performance plan is not installed."
}
}
default {
Write-Host "Invalid state. Please use 'Enable' or 'Disable'."
}
}
} catch {
Write-Error "Error occurred: $_"
}
}
```

View File

@@ -2,7 +2,7 @@
title: "Remove Ultimate Performance Profile"
description: ""
---
```powershell
```powershell {filename="functions/public/Invoke-WPFUltimatePerformance.ps1",linenos=inline,linenostart=1}
Function Invoke-WPFUltimatePerformance {
<#

View File

@@ -2,21 +2,20 @@
title: "Adobe Network Block"
description: ""
---
```json
"WPFTweaksBlockAdobeNet": {
```json {filename="config/tweaks.json",linenos=inline,linenostart=1982}
"WPFTweaksBlockAdobeNet": {
"Content": "Adobe Network Block",
"Description": "Reduce user interruptions by selectively blocking connections to Adobe's activation and telemetry servers. Credit: Ruddernation-Designs",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"Order": "a021_",
"InvokeScript": [
"
$hostsUrl = \"https://github.com/Ruddernation-Designs/Adobe-URL-Block-List/raw/refs/heads/master/hosts\"
$hosts = \"$env:SystemRoot\\System32\\drivers\\etc\\hosts\"
Copy-Item $hosts \"$hosts.bak\"
Copy-Item $hosts \"$env:SystemRoot\\System32\\drivers\\etc\\hosts\\$hosts.bak\"
Invoke-WebRequest $hostsUrl -OutFile $hosts
ipconfig flushdns
ipconfig /flushdns
Write-Host \"Added Adobe url block list from host file\"
"
@@ -24,11 +23,10 @@ description: ""
"UndoScript": [
"
$hosts = \"$env:SystemRoot\\System32\\drivers\\etc\\hosts\"
$backup = \"$hosts.bak\"
$backup = \"$env:SystemRoot\\System32\\drivers\\etc\\hosts\\$hosts.bak\"
Copy-Item $backup $hosts
Remove-Item $backup
ipconfig flushdns
Remove-Item $hosts
ipconfig /flushdns
Write-Host \"Removed Adobe url block list from host file\"
"

View File

@@ -1,18 +1,16 @@
---
title: "Debloat Brave"
title: "Brave Debloat"
description: ""
---
```json
```json {filename="config/tweaks.json",linenos=inline,linenostart=1134}
"WPFTweaksBraveDebloat": {
"Content": "Brave Debloat",
"Description": "Disables various annoyances like Brave Rewards,Leo AI,Crypto Wallet and VPN",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"Order": "a022_",
"registry": [
{
"Path":"HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave",
"Path": "HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave",
"Name": "BraveRewardsDisabled",
"Type": "DWord",
"Value": "1",
@@ -48,3 +46,9 @@ description: ""
}
],
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -2,13 +2,12 @@
title: "Remove ALL MS Store Apps - NOT RECOMMENDED"
description: ""
---
```json
```json {filename="config/tweaks.json",linenos=inline,linenostart=1655}
"WPFTweaksDeBloat": {
"Content": "Remove ALL MS Store Apps - NOT RECOMMENDED",
"Description": "USE WITH CAUTION!!! This will remove ALL Microsoft store apps.",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"Order": "a028_",
"appx": [
"Microsoft.Microsoft3DViewer",
"Microsoft.AppConnector",

View File

@@ -2,13 +2,12 @@
title: "Disable Background Apps"
description: ""
---
```json
"WPFTweaksDisableBGapps": {
```json {filename="config/tweaks.json",linenos=inline,linenostart=2120}
"WPFTweaksDisableBGapps": {
"Content": "Disable Background Apps",
"Description": "Disables all Microsoft Store apps from running in the background, which has to be done individually since Win11",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"Order": "a024_",
"registry": [
{
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\BackgroundAccessApplications",
@@ -21,6 +20,7 @@ description: ""
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -2,13 +2,12 @@
title: "Disable Fullscreen Optimizations"
description: ""
---
```json
"WPFTweaksDisableFSO": {
```json {filename="config/tweaks.json",linenos=inline,linenostart=2136}
"WPFTweaksDisableFSO": {
"Content": "Disable Fullscreen Optimizations",
"Description": "Disables FSO in all applications. NOTE: This will disable Color Management in Exclusive Fullscreen",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"Order": "a024_",
"registry": [
{
"Path": "HKCU:\\System\\GameConfigStore",
@@ -21,6 +20,7 @@ description: ""
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -2,13 +2,12 @@
title: "Disable IPv6"
description: ""
---
```json
"WPFTweaksDisableIPv6": {
```json {filename="config/tweaks.json",linenos=inline,linenostart=2098}
"WPFTweaksDisableIPv6": {
"Content": "Disable IPv6",
"Description": "Disables IPv6.",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"Order": "a024_",
"registry": [
{
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters",
@@ -27,6 +26,7 @@ description: ""
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -2,13 +2,12 @@
title: "Disable Notification Tray/Calendar"
description: ""
---
```json
"WPFTweaksDisableNotifications": {
```json {filename="config/tweaks.json",linenos=inline,linenostart=1959}
"WPFTweaksDisableNotifications": {
"Content": "Disable Notification Tray/Calendar",
"Description": "Disables all Notifications INCLUDING Calendar",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"Order": "a026_",
"registry": [
{
"Path": "HKCU:\\Software\\Policies\\Microsoft\\Windows\\Explorer",
@@ -28,6 +27,7 @@ description: ""
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -2,13 +2,12 @@
title: "Set Display for Performance"
description: ""
---
```json
"WPFTweaksDisplay": {
```json {filename="config/tweaks.json",linenos=inline,linenostart=1542}
"WPFTweaksDisplay": {
"Content": "Set Display for Performance",
"Description": "Sets the system preferences to performance. You can do this manually with sysdm.cpl as well.",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"Order": "a030_",
"registry": [
{
"Path": "HKCU:\\Control Panel\\Desktop",
@@ -80,13 +79,6 @@ description: ""
"Value": "0",
"Type": "DWord"
},
{
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
"OriginalValue": "1",
"Name": "TaskbarDa",
"Value": "0",
"Type": "DWord"
},
{
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
"OriginalValue": "1",
@@ -111,6 +103,7 @@ description: ""
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -1,14 +1,13 @@
---
title: "Debloat Edge"
title: "Edge Debloat"
description: ""
---
```json
"WPFTweaksEdgeDebloat": {
```json {filename="config/tweaks.json",linenos=inline,linenostart=1178}
"WPFTweaksEdgeDebloat": {
"Content": "Edge Debloat",
"Description": "Disables various telemetry options, popups, and other annoyances in Edge.",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"Order": "a026_",
"registry": [
{
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\EdgeUpdate",
@@ -24,6 +23,13 @@ description: ""
"Value": "0",
"OriginalValue": "<RemoveEntry>"
},
{
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge",
"Name": "ofefcgjbeghpigppfmkologfjadafddi",
"Type": "String",
"Value": "1",
"OriginalValue": "<RemoveEntry>"
},
{
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge",
"Name": "ShowRecommendationsEnabled",
@@ -118,9 +124,8 @@ description: ""
],
```
</details>
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -2,13 +2,12 @@
title: "Prefer IPv4 over IPv6"
description: ""
---
```json
"WPFTweaksIPv46": {
```json {filename="config/tweaks.json",linenos=inline,linenostart=2060}
"WPFTweaksIPv46": {
"Content": "Prefer IPv4 over IPv6",
"Description": "To set the IPv4 preference can have latency and security benefits on private networks where IPv6 is not configured.",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"Order": "a027_",
"registry": [
{
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters",
@@ -21,6 +20,7 @@ description: ""
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -2,7 +2,7 @@
title: "Run OO Shutup 10"
description: ""
---
```powershell
```powershell {filename="functions/public/Invoke-WPFOOSU.ps1",linenos=inline,linenostart=1}
function Invoke-WPFOOSU {
<#
.SYNOPSIS
@@ -23,8 +23,3 @@ function Invoke-WPFOOSU {
}
}
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -2,14 +2,12 @@
title: "Block Razer Software Installs"
description: ""
---
```json
```json {filename="config/tweaks.json",linenos=inline,linenostart=1917}
"WPFTweaksRazerBlock": {
"Content": "Block Razer Software Installs",
"Description": "Blocks ALL Razer Software installations. The hardware works fine without any software. WARNING: this will also block all Windows third-party driver installations.",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"Order": "a021_",
"registry": [
{
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\DriverSearching",

View File

@@ -0,0 +1,95 @@
---
title: "Disable Microsoft Copilot"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1816}
"WPFTweaksRemoveCopilot": {
"Content": "Disable Microsoft Copilot",
"Description": "Disables MS Copilot AI built into Windows since 23H2.",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"registry": [
{
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsCopilot",
"Name": "TurnOffWindowsCopilot",
"Type": "DWord",
"Value": "1",
"OriginalValue": "<RemoveEntry>"
},
{
"Path": "HKCU:\\Software\\Policies\\Microsoft\\Windows\\WindowsCopilot",
"Name": "TurnOffWindowsCopilot",
"Type": "DWord",
"Value": "1",
"OriginalValue": "<RemoveEntry>"
},
{
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
"Name": "ShowCopilotButton",
"Type": "DWord",
"Value": "0",
"OriginalValue": "1"
},
{
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\Shell\\Copilot",
"Name": "IsCopilotAvailable",
"Type": "DWord",
"Value": "0",
"OriginalValue": "<RemoveEntry>"
},
{
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\Shell\\Copilot",
"Name": "CopilotDisabledReason",
"Type": "String",
"Value": "IsEnabledForGeographicRegionFailed",
"OriginalValue": "<RemoveEntry>"
},
{
"Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\WindowsCopilot",
"Name": "AllowCopilotRuntime",
"Type": "DWord",
"Value": "0",
"OriginalValue": "<RemoveEntry>"
},
{
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Blocked",
"Name": "{CB3B0003-8088-4EDE-8769-8B354AB2FF8C}",
"Type": "String",
"Value": "",
"OriginalValue": "<RemoveEntry>"
},
{
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\Shell\\Copilot\\BingChat",
"Name": "IsUserEligible",
"Type": "DWord",
"Value": "0",
"OriginalValue": "<RemoveEntry>"
}
],
"InvokeScript": [
"
Write-Host \"Remove Copilot\"
Get-AppxPackage -AllUsers *Copilot* | Remove-AppxPackage -AllUsers
Get-AppxPackage -AllUsers Microsoft.MicrosoftOfficeHub | Remove-AppxPackage -AllUsers
$Appx = (Get-AppxPackage *MicrosoftWindows.Client.CoreAI*).PackageFullName
if ($Appx) {
$Sid = (Get-LocalUser $Env:UserName).Sid.Value
New-Item \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Appx\\AppxAllUserStore\\EndOfLife\\$Sid\\$Appx\" -Force
Remove-AppxPackage $Appx
}
"
],
"UndoScript": [
"
Write-Host \"Install Copilot\"
winget install --name Copilot --source msstore --accept-package-agreements --accept-source-agreements --silent
"
],
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -2,14 +2,12 @@
title: "Remove Microsoft Edge"
description: ""
---
# Json File
```json
```json {filename="config/tweaks.json",linenos=inline,linenostart=1437}
"WPFTweaksRemoveEdge": {
"Content": "Remove Microsoft Edge",
"Description": "Unblocks Microsoft Edge uninstaller restrictions than uses that uninstaller to remove Microsoft Edge",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"Order": "a028_",
"InvokeScript": [
"Invoke-WinUtilRemoveEdge"
],
@@ -20,13 +18,3 @@ description: ""
"
],
```
# Function
```powershell
function Invoke-WinUtilRemoveEdge {
Write-Host "Unlocking The Offical Edge Uninstaller And Removing Microsoft Edge..."
$Path = (Get-ChildItem "C:\Program Files (x86)\Microsoft\Edge\Application\*\Installer\setup.exe")[0].FullName
New-Item "C:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftEdge.exe" -Force
Start-Process $Path -ArgumentList '--uninstall --system-level --force-uninstall --delete-profile'
}
```

View File

@@ -2,13 +2,12 @@
title: "Remove Gallery from explorer"
description: ""
---
```json
"WPFTweaksRemoveGallery": {
```json {filename="config/tweaks.json",linenos=inline,linenostart=1525}
"WPFTweaksRemoveGallery": {
"Content": "Remove Gallery from explorer",
"Description": "Removes the Gallery from Explorer and sets This PC as default",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"Order": "a029_",
"InvokeScript": [
"
Remove-Item \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}\"
@@ -20,8 +19,3 @@ description: ""
"
],
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -1,14 +1,13 @@
---
title: "Remove Home from explorer"
title: "Remove Home from Explorer"
description: ""
---
```json
"WPFTweaksRemoveHome": {
```json {filename="config/tweaks.json",linenos=inline,linenostart=1506}
"WPFTweaksRemoveHome": {
"Content": "Remove Home from Explorer",
"Description": "Removes the Home from Explorer and sets This PC as default",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"Order": "a029_",
"InvokeScript": [
"
Remove-Item \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{f874310e-b6b7-47dc-bc84-b9e6b38f5903}\"
@@ -22,8 +21,3 @@ description: ""
"
],
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -2,14 +2,12 @@
title: "Remove OneDrive"
description: ""
---
```json
```json {filename="config/tweaks.json",linenos=inline,linenostart=1469}
"WPFTweaksRemoveOneDrive": {
"Content": "Remove OneDrive",
"Description": "Denys permission to remove onedrive user files than uses its own uninstaller to remove it than brings back permissions",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"Order": "a029_",
"InvokeScript": [
"
# Deny permission to remove OneDrive folder

View File

@@ -1,14 +1,13 @@
---
title: "Set Classic Right-Click Menu"
title: "Set Classic Right-Click Menu "
description: ""
---
```json
"WPFTweaksRightClickMenu": {
```json {filename="config/tweaks.json",linenos=inline,linenostart=2012}
"WPFTweaksRightClickMenu": {
"Content": "Set Classic Right-Click Menu ",
"Description": "Great Windows 11 tweak to bring back good context menus when right clicking things in explorer.",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"Order": "a030_",
"InvokeScript": [
"
New-Item -Path \"HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\" -Name \"InprocServer32\" -force -value \"\"
@@ -25,8 +24,3 @@ description: ""
"
],
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -2,13 +2,12 @@
title: "Disable Storage Sense"
description: ""
---
```json
"WPFTweaksStorage": {
```json {filename="config/tweaks.json",linenos=inline,linenostart=1800}
"WPFTweaksStorage": {
"Content": "Disable Storage Sense",
"Description": "Storage Sense deletes temp files automatically.",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"Order": "a025_",
"registry": [
{
"Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\StorageSense\\Parameters\\StoragePolicy",
@@ -21,6 +20,7 @@ description: ""
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -2,13 +2,12 @@
title: "Disable Teredo"
description: ""
---
```json
"WPFTweaksTeredo": {
```json {filename="config/tweaks.json",linenos=inline,linenostart=2076}
"WPFTweaksTeredo": {
"Content": "Disable Teredo",
"Description": "Teredo network tunneling is a ipv6 feature that can cause additional latency, but may cause problems with some games",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"Order": "a024_",
"registry": [
{
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters",
@@ -18,9 +17,16 @@ description: ""
"Type": "DWord"
}
],
"InvokeScript": [
"netsh interface teredo set state disabled"
],
"UndoScript": [
"netsh interface teredo set state default"
],
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -2,18 +2,17 @@
title: "Set Time to UTC (Dual Boot)"
description: ""
---
```json
"WPFTweaksUTC": {
```json {filename="config/tweaks.json",linenos=inline,linenostart=1453}
"WPFTweaksUTC": {
"Content": "Set Time to UTC (Dual Boot)",
"Description": "Essential for computers that are dual booting. Fixes the time sync with Linux Systems.",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"Order": "a030_",
"registry": [
{
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation",
"Name": "RealTimeIsUniversal",
"Type": "DWord",
"Type": "QWord",
"Value": "1",
"OriginalValue": "0"
}
@@ -21,6 +20,7 @@ description: ""
```
## Registry Changes
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).

View File

@@ -2,14 +2,12 @@
title: "Remove Xbox & Gaming Components"
description: ""
---
```json
```json {filename="config/tweaks.json",linenos=inline,linenostart=1641}
"WPFTweaksXboxRemoval": {
"Content": "Remove Xbox & Gaming Components",
"Description": "Removes Xbox services, the Xbox app, Game Bar, and related authentication components.",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"Order": "a028_",
"appx": [
"Microsoft.XboxIdentityProvider",
"Microsoft.XboxSpeechToTextOverlay",

View File

@@ -0,0 +1,12 @@
---
title: "DNS"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=2591}
"WPFchangedns": {
"Content": "DNS",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"Type": "Combobox",
"ComboItems": "Default DHCP Google Cloudflare Cloudflare_Malware Cloudflare_Malware_Adult Open_DNS Quad9 AdGuard_Ads_Trackers AdGuard_Ads_Trackers_Malware_Adult",
```

View File

@@ -23,7 +23,7 @@ weight: 2
{{< /tab >}}
{{< tab >}}
* Click the `Get Installed` button.
* Click the `Show Installed Apps` button.
* This will scan for and select all installed programs in Winutil that WinGet supports.
{{< /tab >}}

View File

@@ -2,4 +2,4 @@ module github.com/ChrisTitusTech/WinUtil
go 1.23.3
require github.com/imfing/hextra v0.9.7 // indirect
require github.com/imfing/hextra v0.11.1 // indirect

View File

@@ -1,2 +1,4 @@
github.com/imfing/hextra v0.9.7 h1:Zg5n24us36Bn/S/5mEUPkRW6uwE6vHHEqWSgN0bPXaM=
github.com/imfing/hextra v0.9.7/go.mod h1:cEfel3lU/bSx7lTE/+uuR4GJaphyOyiwNR3PTqFTXpI=
github.com/imfing/hextra v0.11.1 h1:8pTc4ReYbzGTHAnyiebmlT3ijFfIXiGu1r7tM/UGjFI=
github.com/imfing/hextra v0.11.1/go.mod h1:cEfel3lU/bSx7lTE/+uuR4GJaphyOyiwNR3PTqFTXpI=

View File

@@ -37,15 +37,20 @@ pageRef = "KnownIssues.md"
weight = 4
[[menu.main]]
name = "Search"
name = "Store"
url = "https://christitus.com/downloads/"
weight = 5
[[menu.main]]
name = "Search"
weight = 6
[menu.main.params]
type = "search"
[[menu.main]]
name = "GitHub"
weight = 6
weight = 7
url = "https://github.com/christitustech/Winutil"
[menu.main.params]

View File

@@ -1,4 +1,4 @@
copyright: "&copy; <script>document.write(new Date().getFullYear())</script> <a href='https://christitus.com'>Chris Titus Tech</a>. All rights reserved."
copyright: "&copy; <script>document.write(new Date().getFullYear())</script> <a href='https://christitus.com'> Chris Titus Tech</a>. All rights reserved."
backToTop: "Scroll to top"
changeLanguage: "Change language"

View File

@@ -25,10 +25,19 @@ Function Get-WinUtilCheckBoxes {
WPFTweaks = @()
WPFFeature = @()
WPFInstall = @()
WPFToggle = @()
}
$CheckBoxes = $sync.GetEnumerator() | Where-Object { $_.Value -is [System.Windows.Controls.CheckBox] }
# Collect toggle switch states
foreach ($CheckBox in $CheckBoxes) {
if ($CheckBox.Key -like "WPFToggle*" -and $CheckBox.Value.IsChecked -eq $true) {
$Output["WPFToggle"] += $CheckBox.Key
Write-Debug "Adding toggle: $($CheckBox.Key)"
}
}
# First check and add WPFTweaksRestorePoint if checked
$RestorePoint = $CheckBoxes | Where-Object { $_.Key -eq 'WPFTweaksRestorePoint' -and $_.Value.IsChecked -eq $true }
if ($RestorePoint) {

View File

@@ -88,7 +88,7 @@ Function Install-WinUtilProgramWinget {
The Winget ID of the Program that should be uninstalled
#>
param (
[psobject]$Program
[string]$Program
)
try {

View File

@@ -66,8 +66,21 @@ function Invoke-WPFImpex {
Write-Error "Failed to load the JSON file from the specified path or URL: $_"
return
}
$flattenedJson = $jsonFile.PSObject.Properties.Where({ $_.Name -ne "Install" }).ForEach({ $_.Value })
$flattenedJson = $jsonFile.PSObject.Properties.Where({ $_.Name -ne "Install" -and $_.Name -ne "WPFToggle" }).ForEach({ $_.Value })
Invoke-WPFPresets -preset $flattenedJson -imported $true
# Restore toggle switch states
$importedToggles = if ($jsonFile.WPFToggle) { $jsonFile.WPFToggle } else { @() }
$allToggles = $sync.GetEnumerator() | Where-Object { $_.Key -like "WPFToggle*" -and $_.Value -is [System.Windows.Controls.CheckBox] }
foreach ($toggle in $allToggles) {
if ($importedToggles -contains $toggle.Key) {
$sync[$toggle.Key].IsChecked = $true
Write-Debug "Restoring toggle: $($toggle.Key) = checked"
} else {
$sync[$toggle.Key].IsChecked = $false
Write-Debug "Restoring toggle: $($toggle.Key) = unchecked"
}
}
}
} catch {
Write-Error "An error occurred while importing: $_"

View File

@@ -32,7 +32,7 @@ function Invoke-WPFUnInstall {
$ManagerPreference = $sync["ManagerPreference"]
Invoke-WPFRunspace -ArgumentList @(("PackagesToUninstall", $PackagesToUninstall),("ManagerPreference", $ManagerPreference)) -DebugPreference $DebugPreference -ScriptBlock {
Invoke-WPFRunspace -ParameterList @(("PackagesToUninstall", $PackagesToUninstall),("ManagerPreference", $ManagerPreference)) -DebugPreference $DebugPreference -ScriptBlock {
param($PackagesToUninstall, $ManagerPreference, $DebugPreference)
$packagesSorted = Get-WinUtilSelectedPackages -PackageList $PackagesToUninstall -Preference $ManagerPreference

View File

@@ -1,644 +1,347 @@
<#
.DESCRIPTION
This script generates markdown files for the development documentation based on the existing JSON files.
Create table of content and archive any files in the dev folder not modified by this script.
This script is not meant to be used manually, it is called by the github action workflow.
Generates Hugo-compatible markdown files for the development documentation
based on config/tweaks.json and config/feature.json.
Each JSON entry gets its own .md file with the raw JSON snippet or PowerShell function embedded.
Called by the GitHub Actions docs workflow before Hugo build.
#>
function Process-MultilineStrings {
param (
[Parameter(Mandatory, position=0)]
[string]$str
)
$lines = $str.Split("`r`n")
$count = $lines.Count
# Loop through every line, expect last line in the string
# We'll add it after the for loop
for ($i = 0; $i -lt ($count - 1); $i++) {
$line = $lines[$i]
$processedStr += $line -replace ('^\s*\\\\', '')
# Add the previously removed NewLine character by 'Split' Method
$processedStr += "`r`n"
}
# Add last line *without* a NewLine character.
$processedStr += $lines[$($count - 1)] -replace ('^\s*\\\\', '')
return $processedStr
}
function Update-Progress {
param (
[Parameter(Mandatory, position=0)]
[string]$StatusMessage,
[Parameter(Mandatory, position=1)]
[ValidateRange(0,100)]
[int]$Percent,
[Parameter(position=2)]
[string]$Activity = "Compiling"
[int]$Percent
)
Write-Progress -Activity $Activity -Status $StatusMessage -PercentComplete $Percent
Write-Progress -Activity "Generating Dev Docs" -Status $StatusMessage -PercentComplete $Percent
}
function Load-Functions {
param (
[Parameter(Mandatory, position=0)]
[string]$dir
)
Get-ChildItem -Path $dir -Filter *.ps1 | ForEach-Object {
$functionName = $_.BaseName
$functionContent = Get-Content -Path $_.FullName -Raw
$functions[$functionName] = $functionContent
}
}
function Get-CalledFunctions {
param (
[Parameter(Mandatory, position=0)]
$scriptContent,
[Parameter(Mandatory, position=1)]
[hashtable]$functionList,
[Parameter(Mandatory, position=2)]
[ref]$processedFunctions
)
$calledFunctions = @()
foreach ($functionName in $functionList.Keys) {
if ($scriptContent -match "\b$functionName\b" -and -not $processedFunctions.Value.Contains($functionName)) {
$calledFunctions += $functionName
$processedFunctions.Value.Add($functionName)
if ($functionList[$functionName]) {
$nestedFunctions = Get-CalledFunctions -scriptContent $functionList[$functionName] -functionList $functionList -processedFunctions $processedFunctions
$calledFunctions += $nestedFunctions
}
}
}
return $calledFunctions
}
function Get-AdditionalFunctionsFromToggle {
param (
[Parameter(Mandatory, position=0)]
[string]$buttonName
)
$invokeWpfToggleContent = Get-Content -Path "$publicFunctionsDir/Invoke-WPFToggle.ps1" -Raw
$lines = $invokeWpfToggleContent -split "`r`n"
foreach ($line in $lines) {
if ($line -match "`"$buttonName`" \{Invoke-(WinUtil[a-zA-Z]+)") {
return $matches[1]
}
}
}
function Get-AdditionalFunctionsFromButton {
param (
[Parameter(Mandatory, position=0)]
[string]$buttonName
)
$invokeWpfButtonContent = Get-Content -Path "$publicFunctionsDir/Invoke-WPFButton.ps1" -Raw
$lines = $invokeWpfButtonContent -split "`r`n"
foreach ($line in $lines) {
if ($line -match "`"$buttonName`" \{Invoke-(WPF[a-zA-Z]+)") {
return $matches[1]
}
}
}
function Add-LinkAttribute {
function Get-RawJsonBlock {
<#
.SYNOPSIS
Extracts the raw JSON text for a specific item from a JSON file's lines.
Returns the line number and raw text, excluding the "link" property and closing brace.
#>
param (
[Parameter(Mandatory)]
[PSCustomObject]$jsonObject
[string]$ItemName,
[Parameter(Mandatory)]
[AllowEmptyString()]
[string[]]$JsonLines
)
$totalProperties = ($jsonObject.PSObject.Properties | Measure-Object).Count
$progressIncrement = 50 / $totalProperties
$currentProgress = 50
$escapedName = [regex]::Escape($ItemName)
$startIndex = -1
$startIndent = ""
foreach ($property in $jsonObject.PSObject.Properties) {
if ($property.Value -is [PSCustomObject]) {
Add-LinkAttribute -jsonObject $property.Value
} elseif ($property.Value -is [System.Collections.ArrayList]) {
foreach ($item in $property.Value) {
if ($item -is [PSCustomObject]) {
Add-LinkAttribute -jsonObject $item
}
}
# Find the line containing "ItemName": {
for ($i = 0; $i -lt $JsonLines.Count; $i++) {
if ($JsonLines[$i] -match "^(\s*)`"$escapedName`"\s*:\s*\{") {
$startIndex = $i
$startIndent = $matches[1]
break
}
$currentProgress += $progressIncrement
$roundedProgress = [math]::Round($currentProgress)
Update-Progress -StatusMessage "Adding documentation links" -Percent $roundedProgress
}
if ($jsonObject -ne $global:rootObject) {
$jsonObject | Add-Member -NotePropertyName "link" -NotePropertyValue "" -Force
if ($startIndex -eq -1) {
Write-Warning "Could not find '$ItemName' in JSON"
return $null
}
# Find the closing } at the same indentation level
$escapedIndent = [regex]::Escape($startIndent)
$endIndex = -1
for ($i = ($startIndex + 1); $i -lt $JsonLines.Count; $i++) {
if ($JsonLines[$i] -match "^$escapedIndent\}") {
$endIndex = $i
break
}
}
if ($endIndex -eq -1) {
Write-Warning "Could not find closing brace for '$ItemName'"
return $null
}
# Walk backwards from closing brace to exclude "link" property and empty lines
$lastContentIndex = $endIndex - 1
while ($lastContentIndex -gt $startIndex) {
$trimmed = $JsonLines[$lastContentIndex].Trim()
if ($trimmed -eq "" -or $trimmed -match '^"link"') {
$lastContentIndex--
} else {
break
}
}
$rawLines = $JsonLines[$startIndex..$lastContentIndex]
$rawText = $rawLines -join "`r`n"
return @{
LineNumber = $startIndex + 1 # 1-based
RawText = $rawText
}
}
function Generate-MarkdownFiles {
function Get-ButtonFunctionMapping {
<#
.SYNOPSIS
Parses Invoke-WPFButton.ps1 to build a hashtable mapping button names to function names.
#>
param (
[Parameter(Mandatory, position=0)]
[PSCustomObject]$data,
[Parameter(Mandatory, position=1)]
[string]$outputDir,
[Parameter(Mandatory, position=2)]
[string]$jsonFilePath,
[Parameter(Mandatory, position=3)]
[string]$lastModified,
[Parameter(Mandatory, position=4)]
[string]$type,
[Parameter(position=5)]
[int]$initialProgress
[Parameter(Mandatory)]
[string]$ButtonFilePath
)
# TODO: Make the function reference generation better by making a Graph, so it highlights
# Which function "depends" on which, and makes it clearer on a high-level for the reader
# to understand the general structure.
$totalItems = ($data.PSObject.Properties | Measure-Object).Count
$progressIncrement = 10 / $totalItems
$currentProgress = [int]$initialProgress
$tocEntries = @()
$processedFiles = @()
foreach ($itemName in $data.PSObject.Properties.Name) {
# Create Category Directory if needed.
$itemDetails = $data.$itemName
$category = $itemDetails.category -replace '[^a-zA-Z0-9]', '-'
$categoryDir = "$outputDir/$category"
if (-Not (Test-Path -Path $categoryDir)) {
New-Item -ItemType Directory -Path $categoryDir | Out-Null
}
# Create empty files with correct path
$fullItemName = $itemName
$displayName = $itemName -replace $itemnametocut, ''
$filename = "$categoryDir/$displayName.md"
$relativePath = "$outputDir/$category/$displayName.md" -replace '^docs/', ''
if (-Not (Test-Path -Path $filename)) {
Set-Content -Path $filename -Value "" -Encoding utf8
}
# Add the entry to 'tocEntries' so we can generate Table Of Content easily
# And add the Full FileName of entry
$tocEntries += @{
Category = $category
Path = $relativePath
Name = $itemDetails.Content
Type = $type
}
$processedFiles += (Get-Item $filename).FullName
$header = "# $([string]$itemDetails.Content)" + "`r`n"
$lastUpdatedNotice = "Last Updated: $lastModified" + "`r`n"
$autoupdatenotice = Process-MultilineStrings @"
\\!!! 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.**
"@
$description = Process-MultilineStrings @"
\\## Description
\\
\\$([string]$itemDetails.Description)
"@
$jsonContent = ($itemDetails | ConvertTo-Json -Depth 10).replace('\n',"`n").replace('\r', "`r")
$codeBlock = Process-MultilineStrings @"
\\<details>
\\<summary>Preview Code</summary>
\\
\\``````json
\\$jsonContent
\\``````
\\
\\</details>
"@
# Clear the variable before continuing, will cause problems otherwise
$FeaturesDocs = ""
if ($itemDetails.feature) {
$FeaturesDocs += Process-MultilineStrings @"
\\## Features
\\
\\
\\Optional Windows Features are additional functionalities or components in the Windows operating system that users can choose to enable or disable based on their specific needs and preferences.
\\
\\
\\You can find information about Optional Windows Features on [Microsoft's Website for Optional Features](https://learn.microsoft.com/en-us/windows/client-management/client-tools/add-remove-hide-features?pivots=windows-11).
\\
\\
"@
if (($itemDetails.feature).Count -gt 1) {
$FeaturesDocs += "### Features to install" + "`r`n"
} else {
$FeaturesDocs += "### Feature to install" + "`r`n"
}
foreach ($feature in $itemDetails.feature) {
$FeaturesDocs += "- $($feature)" + "`r`n"
}
}
# Clear the variable before continuing, will cause problems otherwise
$InvokeScript = ""
if ($itemDetails.InvokeScript) {
$InvokeScriptContent = $itemDetails.InvokeScript | Out-String
$InvokeScript = Process-MultilineStrings @"
\\## Invoke Script
\\
\\``````powershell
\\$InvokeScriptContent
\\``````
"@
}
# Clear the variable before continuing, will cause problems otherwise
$UndoScript = ""
if ($itemDetails.UndoScript) {
$UndoScriptContent = $itemDetails.UndoScript | Out-String
$UndoScript = Process-MultilineStrings @"
\\## Undo Script
\\
\\``````powershell
\\$UndoScriptContent
\\``````
"@
}
# Clear the variable before continuing, will cause problems otherwise
$ToggleScript = ""
if ($itemDetails.ToggleScript) {
$ToggleScriptContent = $itemDetails.ToggleScript | Out-String
$ToggleScript = Process-MultilineStrings @"
\\## Toggle Script
\\
\\``````powershell
\\$ToggleScriptContent
\\``````
"@
}
# Clear the variable before continuing, will cause problems otherwise
$ButtonScript = ""
if ($itemDetails.ButtonScript) {
$ButtonScriptContent = $itemDetails.ButtonScript | Out-String
$ButtonScript = Process-MultilineStrings @"
\\## Button Script
\\
\\``````powershell
\\$ButtonScriptContent
\\``````
"@
}
# Clear the variable before continuing, will cause problems otherwise
$FunctionDetails = ""
$processedFunctions = New-Object 'System.Collections.Generic.HashSet[System.String]'
$allScripts = @($itemDetails.InvokeScript, $itemDetails.UndoScript, $itemDetails.ToggleScript, $itemDetails.ButtonScript)
foreach ($script in $allScripts) {
if ($script) {
$calledFunctions = Get-CalledFunctions -scriptContent $script -functionList $functions -processedFunctions ([ref]$processedFunctions)
foreach ($functionName in $calledFunctions) {
if ($functions.ContainsKey($functionName)) {
$FunctionDetails += Process-MultilineStrings @"
\\## Function: $functionName
\\
\\``````powershell
\\$($functions[$functionName])
\\``````
\\
"@
}
}
}
}
$additionalFunctionToggle = Get-AdditionalFunctionsFromToggle -buttonName $fullItemName
if ($additionalFunctionToggle) {
$additionalFunctionNameToggle = "Invoke-$additionalFunctionToggle"
if ($functions.ContainsKey($additionalFunctionNameToggle) -and -not $processedFunctions.Contains($additionalFunctionNameToggle)) {
$FunctionDetails += Process-MultilineStrings @"
\\## Function: $additionalFunctionNameToggle
\\
\\``````powershell
\\$($functions[$additionalFunctionNameToggle])
\\``````
\\
"@
$processedFunctions.Add($additionalFunctionNameToggle)
}
}
$additionalFunctionButton = Get-AdditionalFunctionsFromButton -buttonName $fullItemName
if ($additionalFunctionButton) {
$additionalFunctionNameButton = "Invoke-$additionalFunctionButton"
if ($functions.ContainsKey($additionalFunctionNameButton) -and -not $processedFunctions.Contains($additionalFunctionNameButton)) {
$FunctionDetails += Process-MultilineStrings @"
\\## Function: $additionalFunctionNameButton
\\
\\``````powershell
\\$($functions[$additionalFunctionNameButton])
\\``````
\\
"@
$processedFunctions.Add($additionalFunctionNameButton)
}
}
# Clear the variable before continuing, will cause problems otherwise
$registryDocs = ""
if ($itemDetails.registry) {
$registryDocs += Process-MultilineStrings @"
\\## Registry Changes
\\Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
\\
\\
\\You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).
\\
\\
"@
foreach ($regEntry in $itemDetails.registry) {
$registryDocs += Process-MultilineStrings @"
\\### Registry Key: $($regEntry.Name)
\\
\\**Type:** $($regEntry.Type)
\\
\\**Original Value:** $($regEntry.OriginalValue)
\\
\\**New Value:** $($regEntry.Value)
\\
\\
"@
}
}
# Clear the variable before continuing, will cause problems otherwise
$serviceDocs = ""
if ($itemDetails.service) {
$serviceDocs = Process-MultilineStrings @"
\\## Service Changes
\\
\\Windows services are background processes for system functions or applications. Setting some to manual optimizes performance by starting them only when needed.
\\
\\You can find information about services on [Wikipedia](https://www.wikiwand.com/en/Windows_service) and [Microsoft's Website](https://learn.microsoft.com/en-us/dotnet/framework/windows-services/introduction-to-windows-service-applications).
\\
\\
"@
foreach ($service in $itemDetails.service) {
$serviceDocs += Process-MultilineStrings @"
\\### Service Name: $($service.Name)
\\
\\**Startup Type:** $($service.StartupType)
\\
\\**Original Type:** $($service.OriginalType)
\\
\\
"@
}
}
# Clear the variable before continuing, will cause problems otherwise
$scheduledTaskDocs = ""
if ($itemDetails.ScheduledTask) {
$scheduledTaskDocs = Process-MultilineStrings @"
\\## Scheduled Task Changes
\\
\\Windows scheduled tasks are used to run scripts or programs at specific times or events. Disabling unnecessary tasks can improve system performance and reduce unwanted background activity.
\\
\\
\\You can find information about scheduled tasks on [Wikipedia](https://www.wikiwand.com/en/Windows_Task_Scheduler) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/desktop/taskschd/about-the-task-scheduler).
\\
\\
"@
foreach ($task in $itemDetails.ScheduledTask) {
$scheduledTaskDocs += Process-MultilineStrings @"
\\### Task Name: $($task.Name)
\\
\\**State:** $($task.State)
\\
\\**Original State:** $($task.OriginalState)
\\
\\
"@
}
}
$jsonLink = "[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/$jsonFilePath)"
$customContentStartTag = "<!-- BEGIN CUSTOM CONTENT -->"
$customContentEndTag = "<!-- END CUSTOM CONTENT -->"
$secondCustomContentStartTag = "<!-- BEGIN SECOND CUSTOM CONTENT -->"
$secondCustomContentEndTag = "<!-- END SECOND CUSTOM CONTENT -->"
if (Test-Path -Path "$filename") {
$existingContent = Get-Content -Path "$filename" -Raw
$customContentPattern = "(?s)$customContentStartTag(.*?)$customContentEndTag"
$secondCustomContentPattern = "(?s)$secondCustomContentStartTag(.*?)$secondCustomContentEndTag"
if ($existingContent -match $customContentPattern) {
$customContent = $matches[1].Trim()
}
if ($existingContent -match $secondCustomContentPattern) {
$secondCustomContent = $matches[1].Trim()
}
}
$fileContent = Process-MultilineStrings @"
\\$header
\\$lastUpdatedNotice
\\
\\$autoupdatenotice
\\$( if ($itemDetails.Description) { $description } )
\\
\\$customContentStartTag
\\$customContent
\\$customContentEndTag
\\
\\$codeBlock
\\
\\$(
if ($FeaturesDocs) { $FeaturesDocs + "`r`n" }
if ($itemDetails.InvokeScript) { $InvokeScript + "`r`n" }
if ($itemDetails.UndoScript) { $UndoScript + "`r`n" }
if ($itemDetails.ToggleScript) { $ToggleScript + "`r`n" }
if ($itemDetails.ButtonScript) { $ButtonScript + "`r`n" }
if ($FunctionDetails) { $FunctionDetails + "`r`n" }
if ($itemDetails.registry) { $registryDocs + "`r`n" }
if ($itemDetails.service) { $serviceDocs + "`r`n" }
if ($itemDetails.ScheduledTask) { $scheduledTaskDocs + "`r`n" }
)
\\$secondCustomContentStartTag
\\$secondCustomContent
\\$secondCustomContentEndTag
\\
\\
\\$jsonLink
"@
Set-Content -Path "$filename" -Value "$fileContent" -Encoding utf8
# TODO: For whatever reason, some headers have a space before them,
# so as a temporary fix.. we'll remove these it so mkdocs can render properly
(Get-Content -Raw -Path "$filename").Replace(' ##', '##') | Set-Content "$filename"
$currentProgress += $progressIncrement
$roundedProgress = [math]::Round($currentProgress)
Update-Progress -StatusMessage "Generating content for documentation" -Percent $roundedProgress
}
return [PSCustomObject]@{
TocEntries = $tocEntries
ProcessedFiles = $processedFiles
}
}
function Generate-TypeSectionContent {
param (
[array]$entries
)
$totalEntries = $entries.Count
$progressIncrement = 10 / $totalEntries
$currentProgress = 90
$sectionContent = ""
$categories = @{}
foreach ($entry in $entries) {
if (-Not $categories.ContainsKey($entry.Category)) {
$categories[$entry.Category] = @()
}
$categories[$entry.Category] += $entry
$currentProgress += $progressIncrement
$roundedProgress = [math]::Round($currentProgress)
Update-Progress -StatusMessage "Generating table of contents" -Percent $roundedProgress
}
foreach ($category in $categories.Keys) {
$sectionContent += "### $category`r`n`r`n"
foreach ($entry in $categories[$category]) {
$sectionContent += "- [$($entry.Name)]($($entry.Path))`r`n"
$mapping = @{}
$lines = Get-Content -Path $ButtonFilePath
foreach ($line in $lines) {
if ($line -match '^\s*"(\w+)"\s*\{(Invoke-\w+)') {
$mapping[$matches[1]] = $matches[2]
}
}
return $sectionContent
return $mapping
}
function Add-LinkAttributeToJson {
<#
.SYNOPSIS
Updates the "link" property on each top-level entry in a JSON config file
to point to the corresponding documentation page URL.
#>
param (
[string]$jsonFilePath,
[string]$outputDir
[Parameter(Mandatory)]
[string]$JsonFilePath,
[Parameter(Mandatory)]
[string]$UrlPrefix,
[Parameter(Mandatory)]
[string]$ItemNameToCut
)
$jsonText = Get-Content -Path $jsonFilePath -Raw
$jsonText = Get-Content -Path $JsonFilePath -Raw
$jsonData = $jsonText | ConvertFrom-Json
$totalItems = ($jsonData.PSObject.Properties | Measure-Object).Count
$progressIncrement = 20 / $totalItems
$currentProgress = 70
foreach ($item in $jsonData.PSObject.Properties) {
$itemName = $item.Name
$itemDetails = $item.Value
$category = $itemDetails.category -replace '[^a-zA-Z0-9]', '-'
$displayName = $itemName -replace "$itemnametocut", ''
$relativePath = "$outputDir/$category/$displayName" -replace '^docs/', ''
$docLink = "https://christitustech.github.io/winutil/$relativePath"
$jsonData.$itemName.link = $docLink
$displayName = $itemName -replace $ItemNameToCut, ''
$docLink = "$UrlPrefix/$($category.ToLower())/$($displayName.ToLower())"
$currentProgress += $progressIncrement
$roundedProgress = [math]::Round($currentProgress)
Update-Progress -StatusMessage "Adding documentation links to JSON" -Percent $roundedProgress
$itemDetails | Add-Member -NotePropertyName "link" -NotePropertyValue $docLink -Force
}
$jsonText = ($jsonData | ConvertTo-Json -Depth 10).replace('\n',"`n").replace('\r', "`r")
Set-Content -Path $jsonFilePath -Value ($jsonText) -Encoding utf8
$jsonText = ($jsonData | ConvertTo-Json -Depth 100).replace('\n', "`n").replace('\r', "`r")
Set-Content -Path $JsonFilePath -Value $jsonText -Encoding utf8
}
# ==============================================================================
# Main Script
# ==============================================================================
# Use PSScriptRoot if available (running as a script file), otherwise assume CWD is tools/
$scriptDir = if ($PSScriptRoot) { $PSScriptRoot } else { (Get-Location).Path }
$repoRoot = Resolve-Path "$scriptDir/.."
# Paths
$tweaksJsonPath = "$repoRoot/config/tweaks.json"
$featuresJsonPath = "$repoRoot/config/feature.json"
$tweaksOutputDir = "$repoRoot/docs/content/dev/tweaks"
$featuresOutputDir = "$repoRoot/docs/content/dev/features"
$publicFunctionsDir = "$repoRoot/functions/public"
$privateFunctionsDir = "$repoRoot/functions/private"
$itemnametocut = 'WPF(WinUtil|Toggle|Features?|Tweaks?|Panel|Fix(es)?)?'
$baseUrl = "https://winutil.christitus.com"
# Categories that should have generated documentation
$documentedCategories = @(
"Essential Tweaks",
"z__Advanced Tweaks - CAUTION",
"Customize Preferences",
"Performance Plans",
"Features",
"Fixes",
"Legacy Windows Panels"
)
# --- Load data ---
Update-Progress "Loading JSON files" 10
$tweaks = Get-Content -Path "../config/tweaks.json" | ConvertFrom-Json
$features = Get-Content -Path "../config/feature.json" | ConvertFrom-Json
$tweaks = Get-Content -Path $tweaksJsonPath -Raw | ConvertFrom-Json
$features = Get-Content -Path $featuresJsonPath -Raw | ConvertFrom-Json
Update-Progress "Getting last modified dates of the JSON files" 20
$tweaksLastModified = (Get-Item "../config/tweaks.json").LastWriteTime.ToString("yyyy-MM-dd")
$featuresLastModified = (Get-Item "../config/feature.json").LastWriteTime.ToString("yyyy-MM-dd")
# --- Load function files (content + relative path) ---
$tweaksOutputDir = "../docs/dev/tweaks"
$featuresOutputDir = "../docs/dev/features"
$privateFunctionsDir = "../functions/private"
$publicFunctionsDir = "../functions/public"
$functions = @{}
$itemnametocut = "WPF(WinUtil|Toggle|Features?|Tweaks?|Panel|Fix(es)?)?"
Update-Progress "Creating Directories" 30
if (-Not (Test-Path -Path $tweaksOutputDir)) {
New-Item -ItemType Directory -Path $tweaksOutputDir | Out-Null
Update-Progress "Loading function files" 20
$functionFiles = @{}
Get-ChildItem -Path $publicFunctionsDir -Filter *.ps1 | ForEach-Object {
$functionFiles[$_.BaseName] = @{
Content = (Get-Content -Path $_.FullName -Raw).TrimEnd()
RelativePath = "functions/public/$($_.Name)"
}
}
if (-Not (Test-Path -Path $featuresOutputDir)) {
New-Item -ItemType Directory -Path $featuresOutputDir | Out-Null
Get-ChildItem -Path $privateFunctionsDir -Filter *.ps1 | ForEach-Object {
$functionFiles[$_.BaseName] = @{
Content = (Get-Content -Path $_.FullName -Raw).TrimEnd()
RelativePath = "functions/private/$($_.Name)"
}
}
Update-Progress "Loading existing Functions" 40
Load-Functions -dir $privateFunctionsDir
Load-Functions -dir $publicFunctionsDir
# --- Build button-to-function mapping ---
Update-Progress "Adding documentation links to JSON files" 50
Update-Progress "Building button-to-function mapping" 30
$buttonFunctionMap = Get-ButtonFunctionMapping -ButtonFilePath "$publicFunctionsDir/Invoke-WPFButton.ps1"
# Define the JSON file paths
$jsonPaths = @("../config/feature.json", "../config/tweaks.json")
# --- Update link attributes in JSON files ---
# Loop through each JSON file path
foreach ($jsonPath in $jsonPaths) {
# Load the JSON content
$json = Get-Content -Raw -Path $jsonPath | ConvertFrom-Json
Update-Progress "Updating documentation links in JSON" 40
Add-LinkAttributeToJson -JsonFilePath $tweaksJsonPath -UrlPrefix "$baseUrl/dev/tweaks" -ItemNameToCut $itemnametocut
Add-LinkAttributeToJson -JsonFilePath $featuresJsonPath -UrlPrefix "$baseUrl/dev/features" -ItemNameToCut $itemnametocut
# Set the global root object to the current json object
$global:rootObject = $json
# Reload JSON lines after link update (so line numbers are accurate)
$tweaksLines = Get-Content -Path $tweaksJsonPath
$featuresLines = Get-Content -Path $featuresJsonPath
# Add the "link" attribute to the JSON
Add-LinkAttribute -jsonObject $json
# ==============================================================================
# Clean up old generated .md files (keep _index.md)
# ==============================================================================
# Convert back to JSON with the original formatting
$jsonString = ($json | ConvertTo-Json -Depth 100).replace('\n',"`n").replace('\r', "`r")
# Save the JSON back to the file
Set-Content -Path $jsonPath -Value $jsonString
Update-Progress "Cleaning up old generated docs" 45
foreach ($dir in @($tweaksOutputDir, $featuresOutputDir)) {
Get-ChildItem -Path $dir -Recurse -Filter *.md | Where-Object {
$_.Name -ne "_index.md"
} | Remove-Item -Force
}
Add-LinkAttributeToJson -jsonFilePath "../config/tweaks.json" -outputDir "dev/tweaks"
Add-LinkAttributeToJson -jsonFilePath "../config/feature.json" -outputDir "dev/features"
# ==============================================================================
# Generate Tweak Documentation
# ==============================================================================
Update-Progress "Generating content for documentation" 60
$tweakResult = Generate-MarkdownFiles -data $tweaks -outputDir $tweaksOutputDir -jsonFilePath "../config/tweaks.json" -lastModified $tweaksLastModified -type "tweak" -initialProgress 60
$featureResult = Generate-MarkdownFiles -data $features -outputDir $featuresOutputDir -jsonFilePath "../config/feature.json" -lastModified $featuresLastModified -type "feature" -initialProgress 70
Update-Progress "Generating tweak documentation" 50
Update-Progress "Generating table of contents" 80
$allTocEntries = $tweakResult.TocEntries + $featureResult.TocEntries
$tweakEntries = ($allTocEntries).where{ $_.Type -eq 'tweak' } | Sort-Object Category, Name
$featureEntries = ($allTocEntries).where{ $_.Type -eq 'feature' } | Sort-Object Category, Name
$tweakNames = $tweaks.PSObject.Properties.Name
$totalTweaks = $tweakNames.Count
$tweakCount = 0
$indexContent += Process-MultilineStrings @"
\\# Table of Contents
\\
\\
\\## Tweaks
\\
\\
"@
$indexContent += $(Generate-TypeSectionContent $tweakEntries) + "`r`n"
$indexContent += Process-MultilineStrings @"
\\## Features
\\
\\
"@
$indexContent += $(Generate-TypeSectionContent $featureEntries) + "`r`n"
Set-Content -Path "../docs/devdocs.md" -Value $indexContent -Encoding utf8
foreach ($itemName in $tweakNames) {
$item = $tweaks.$itemName
$tweakCount++
if ($item.category -notin $documentedCategories) { continue }
$category = $item.category -replace '[^a-zA-Z0-9]', '-'
$displayName = $itemName -replace $itemnametocut, ''
$categoryDir = "$tweaksOutputDir/$category"
$filename = "$categoryDir/$displayName.md"
if (-Not (Test-Path -Path $categoryDir)) {
New-Item -ItemType Directory -Path $categoryDir | Out-Null
}
# Hugo frontmatter
$title = $item.Content -replace '"', '\"'
$content = "---`r`ntitle: `"$title`"`r`ndescription: `"`"`r`n---`r`n"
if ($item.Type -eq "Button") {
# Button-type tweak: embed the mapped PowerShell function
$funcName = $buttonFunctionMap[$itemName]
if ($funcName -and $functionFiles.ContainsKey($funcName)) {
$func = $functionFiles[$funcName]
$content += "``````powershell {filename=`"$($func.RelativePath)`",linenos=inline,linenostart=1}`r`n"
$content += $func.Content + "`r`n"
$content += "```````r`n"
}
} else {
# Standard tweak: embed raw JSON block
$jsonBlock = Get-RawJsonBlock -ItemName $itemName -JsonLines $tweaksLines
if ($jsonBlock) {
$content += "``````json {filename=`"config/tweaks.json`",linenos=inline,linenostart=$($jsonBlock.LineNumber)}`r`n"
$content += $jsonBlock.RawText + "`r`n"
$content += "```````r`n"
}
# Registry Changes section
if ($item.registry) {
$content += "`r`n## Registry Changes`r`n`r`n"
$content += "Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.`r`n`r`n"
$content += "You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).`r`n"
}
# Service function reference
if ($item.service -and $functionFiles.ContainsKey("Set-WinUtilService")) {
$svcFunc = $functionFiles["Set-WinUtilService"]
$content += "#Function`r`n"
$content += "``````powershell {filename=`"$($svcFunc.RelativePath)`",linenos=inline,linenostart=1}`r`n"
$content += $svcFunc.Content + "`r`n"
$content += "```````r`n"
}
}
Set-Content -Path $filename -Value $content -Encoding utf8 -NoNewline
$percent = 50 + [int](($tweakCount / $totalTweaks) * 20)
if ($percent -gt 70) { $percent = 70 }
Update-Progress "Generating tweak documentation ($tweakCount/$totalTweaks)" $percent
}
# ==============================================================================
# Generate Feature Documentation
# ==============================================================================
Update-Progress "Generating feature documentation" 70
$featureNames = $features.PSObject.Properties.Name
$totalFeatures = $featureNames.Count
$featureCount = 0
foreach ($itemName in $featureNames) {
$item = $features.$itemName
$featureCount++
if ($item.category -notin $documentedCategories) { continue }
# Skip pure UI buttons that don't need docs
if ($itemName -eq "WPFFeatureInstall") { continue }
$category = $item.category -replace '[^a-zA-Z0-9]', '-'
$displayName = $itemName -replace $itemnametocut, ''
$categoryDir = "$featuresOutputDir/$category"
$filename = "$categoryDir/$displayName.md"
if (-Not (Test-Path -Path $categoryDir)) {
New-Item -ItemType Directory -Path $categoryDir | Out-Null
}
$title = $item.Content -replace '"', '\"'
$content = "---`r`ntitle: `"$title`"`r`ndescription: `"`"`r`n---`r`n"
if ($item.category -eq "Fixes" -or $item.category -eq "Legacy Windows Panels") {
# Embed the PowerShell function file
$funcName = $buttonFunctionMap[$itemName]
if ($funcName -and $functionFiles.ContainsKey($funcName)) {
$func = $functionFiles[$funcName]
$content += "``````powershell {filename=`"$($func.RelativePath)`",linenos=inline,linenostart=1}`r`n"
$content += $func.Content + "`r`n"
$content += "```````r`n"
}
} else {
# Features category: embed raw JSON block
$jsonBlock = Get-RawJsonBlock -ItemName $itemName -JsonLines $featuresLines
if ($jsonBlock) {
$content += "``````json {filename=`"config/feature.json`",linenos=inline,linenostart=$($jsonBlock.LineNumber)}`r`n"
$content += $jsonBlock.RawText + "`r`n"
$content += "```````r`n"
}
}
Set-Content -Path $filename -Value $content -Encoding utf8 -NoNewline
$percent = 70 + [int](($featureCount / $totalFeatures) * 20)
if ($percent -gt 90) { $percent = 90 }
Update-Progress "Generating feature documentation ($featureCount/$totalFeatures)" $percent
}
Update-Progress "Process Completed" 100
Write-Host "Documentation generation complete."

Some files were not shown because too many files have changed in this diff Show More