Compare commits

...
17 Commits
Author SHA1 Message Date
ChrisTitusTechandgithub-actions[bot] 3f1f54a0bb Update sponsors in README 2026-06-08 16:44:36 +00:00
Chris TitusandGitHub ea1cff0724 Add 'Refactor' option to PR template 2026-06-08 10:19:47 -05:00
Chris TitusandGitHub 09569162a1 chore: Update generated dev docs (#4672) 2026-06-08 10:10:56 -05:00
Neac0andGitHub bced250ae1 Fix Remove Home and Gallery (#4654)
Fixes the deletion of "Home" and "Gallery" in File Explorer. Now it correctly deletes both.
2026-06-08 10:10:19 -05:00
Chris TitusandGitHub 80aa6af30a chore: Update generated dev docs (#4671) 2026-06-08 10:05:32 -05:00
5a233b3422 fix: add registry tracking to WPFTweaksRightClickMenu for drift detection (#4636)
* fix: correct false-positives and service tracking in drift detection

* Update Invoke-WPFtweaksbutton.ps1

* Update Invoke-WPFtweaksbutton.ps1

* Update Invoke-WPFtweaksbutton.ps1

---------

Co-authored-by: Dev <dev@localhost>
2026-06-08 10:04:20 -05:00
GabiandGitHub 01ef78915a Remove -NoUi (#4572)
* Made -NoUi not exit the window

* Update start.ps1

* Update main.ps1

* Update main.ps1

* Update Set-WinUtilProgressbar.ps1

* Update Invoke-WPFImpex.ps1

* Update Invoke-WPFUIThread.ps1

* Update start.ps1

* Update Invoke-WPFUIThread.ps1

* Update main.ps1

* Update main.ps1
2026-06-08 10:02:35 -05:00
Chris TitusandGitHub 7dfebba70f chore: Update generated dev docs (#4670) 2026-06-08 10:01:26 -05:00
0a018e0405 Update WPFTweaksRevertStartMenu (#4615)
* Update tweaks.json

* Update preset.json

* Update preset.json

* Update tweaks.json

* Update KnownIssues.md

---------

Co-authored-by: Chris Titus <contact@christitus.com>
2026-06-08 10:00:43 -05:00
Chris TitusandGitHub e50621a9dc chore: Update generated dev docs (#4669) 2026-06-08 09:49:20 -05:00
3ef100a083 Fixed bug merged in #4577 that breaks Taskbar Search Icon tweak (#4649)
Co-authored-by: gepardjaro <266757713+drzewjaro@users.noreply.github.com>
2026-06-08 09:48:41 -05:00
Chris TitusandGitHub eebb56ac5a chore: Update generated dev docs (#4668) 2026-06-08 09:45:11 -05:00
GabiandGitHub daf045390d fix dev branch not working (#4651)
* fix dev branch not working

* Update start.ps1
2026-06-08 09:44:14 -05:00
GabiandGitHub 6214012fd1 Added -NoRestart to WPFTweaksWindowsAI (#4639) 2026-06-08 09:43:20 -05:00
CodingWondersandGitHub 297b3079e5 Fix slop remains (#4640)
* Fix slop remains

Chris likes to vibe code. AI likes to use different types of dashes (em-dashes, en-dashes), instead of regular dashes (-).

On PowerShell 7 this appears to work. The parser doesn't care. But, what about PowerShell 5? It begins throwing errors about the ampersand. Loading it in the ISE reveals how it stops parsing the syntax correctly when it encounters em-dashes. Rather than displaying them as such, the ISE displays them as —.

Chris, if you want to vibe code, I don't mind. But at least use regular dashes.

Anyway, I won't fix the AI code. I just want to make it work on my beloved powershell 5.

* Apparently this file is important
2026-06-08 09:43:04 -05:00
Chris TitusandGitHub 9fdf944ef9 chore: Update generated dev docs (#4667) 2026-06-08 09:43:02 -05:00
GabiandGitHub 6b5a9bcb9b Added -Recurse for Onedrive Remove-Item command (#4642) 2026-06-08 09:42:25 -05:00
71 changed files with 173 additions and 223 deletions
+1
View File
@@ -5,6 +5,7 @@
- [ ] New feature
- [ ] Bug fix
- [ ] Documentation update
- [ ] Refactor
- [ ] UI/UX improvement
<!-- This automatically adds labels to your PR based on the selections above. -->
+1 -1
View File
@@ -77,7 +77,7 @@ See https://github.com/ChrisTitusTech/winutil/blob/main/.github/CONTRIBUTING.md
These are the sponsors that help keep this project alive with monthly contributions.
<!-- sponsors --><a href="https://github.com/dwelfusius"><img src="https:&#x2F;&#x2F;github.com&#x2F;dwelfusius.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/mews-se"><img src="https:&#x2F;&#x2F;github.com&#x2F;mews-se.png" width="60px" alt="User avatar: Martin Stockzell" /></a><a href="https://github.com/jdiegmueller"><img src="https:&#x2F;&#x2F;github.com&#x2F;jdiegmueller.png" width="60px" alt="User avatar: Jason A. Diegmueller" /></a><a href="https://github.com/robertsandrock"><img src="https:&#x2F;&#x2F;github.com&#x2F;robertsandrock.png" width="60px" alt="User avatar: RMS" /></a><a href="https://github.com/paulsheets"><img src="https:&#x2F;&#x2F;github.com&#x2F;paulsheets.png" width="60px" alt="User avatar: Paul" /></a><a href="https://github.com/djones369"><img src="https:&#x2F;&#x2F;github.com&#x2F;djones369.png" width="60px" alt="User avatar: Dave J (WhamGeek)" /></a><a href="https://github.com/anthonymendez"><img src="https:&#x2F;&#x2F;github.com&#x2F;anthonymendez.png" width="60px" alt="User avatar: Anthony Mendez" /></a><a href="https://github.com/FatBastard0"><img src="https:&#x2F;&#x2F;github.com&#x2F;FatBastard0.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/DursleyGuy"><img src="https:&#x2F;&#x2F;github.com&#x2F;DursleyGuy.png" width="60px" alt="User avatar: DursleyGuy" /></a><a href="https://github.com/DwayneTheRockLobster1"><img src="https:&#x2F;&#x2F;github.com&#x2F;DwayneTheRockLobster1.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/KieraKujisawa"><img src="https:&#x2F;&#x2F;github.com&#x2F;KieraKujisawa.png" width="60px" alt="User avatar: Kiera Meredith" /></a><a href="https://github.com/andrewpayne68"><img src="https:&#x2F;&#x2F;github.com&#x2F;andrewpayne68.png" width="60px" alt="User avatar: Andrew P" /></a><!-- sponsors -->
<!-- sponsors --><a href="https://github.com/dwelfusius"><img src="https:&#x2F;&#x2F;github.com&#x2F;dwelfusius.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/mews-se"><img src="https:&#x2F;&#x2F;github.com&#x2F;mews-se.png" width="60px" alt="User avatar: Martin Stockzell" /></a><a href="https://github.com/jdiegmueller"><img src="https:&#x2F;&#x2F;github.com&#x2F;jdiegmueller.png" width="60px" alt="User avatar: Jason A. Diegmueller" /></a><a href="https://github.com/robertsandrock"><img src="https:&#x2F;&#x2F;github.com&#x2F;robertsandrock.png" width="60px" alt="User avatar: RMS" /></a><a href="https://github.com/paulsheets"><img src="https:&#x2F;&#x2F;github.com&#x2F;paulsheets.png" width="60px" alt="User avatar: Paul" /></a><a href="https://github.com/djones369"><img src="https:&#x2F;&#x2F;github.com&#x2F;djones369.png" width="60px" alt="User avatar: Dave J (WhamGeek)" /></a><a href="https://github.com/anthonymendez"><img src="https:&#x2F;&#x2F;github.com&#x2F;anthonymendez.png" width="60px" alt="User avatar: Anthony Mendez" /></a><a href="https://github.com/FatBastard0"><img src="https:&#x2F;&#x2F;github.com&#x2F;FatBastard0.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/DursleyGuy"><img src="https:&#x2F;&#x2F;github.com&#x2F;DursleyGuy.png" width="60px" alt="User avatar: DursleyGuy" /></a><a href="https://github.com/DwayneTheRockLobster1"><img src="https:&#x2F;&#x2F;github.com&#x2F;DwayneTheRockLobster1.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/KieraKujisawa"><img src="https:&#x2F;&#x2F;github.com&#x2F;KieraKujisawa.png" width="60px" alt="User avatar: Kiera Meredith" /></a><a href="https://github.com/andrewpayne68"><img src="https:&#x2F;&#x2F;github.com&#x2F;andrewpayne68.png" width="60px" alt="User avatar: Andrew P" /></a><a href="https://github.com/ameaninglessname"><img src="https:&#x2F;&#x2F;github.com&#x2F;ameaninglessname.png" width="60px" alt="User avatar: CodingBot" /></a><!-- sponsors -->
---
+27 -9
View File
@@ -77,9 +77,9 @@
],
"link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/widget"
},
"WPFTweaksRevertStartMenu": {
"WPFTweaksRevertStartMenu": {
"Content": "Start Menu Previous Layout - Enable",
"Description": "Bring back the old Start Menu layout from before the gradual rollout of the new one in 25H2.",
"Description": "Bring back the old Start Menu layout from before the gradual rollout of the new one in 25H2. On newer versions of windows !!THIS TWEAK WILL NOT WORK!!",
"category": "Essential Tweaks",
"panel": "1",
"InvokeScript": [
@@ -94,6 +94,7 @@
Remove-Item ViVeTool -Recurse
Write-Host 'Old start menu reverted. Please restart your computer to take effect.'
Write-Host 'On newer versions of windows !!THIS TWEAK WILL NOT WORK!!.'
"
],
"UndoScript": [
@@ -110,7 +111,8 @@
Write-Host 'New start menu reverted. Please restart your computer to take effect.'
"
],
"link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/revertstartmenu"
"link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/revertstartmenu",
"link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/revertstartmenu"
},
"WPFTweaksDisableStoreSearch": {
"Content": "Microsoft Store Recommended Search Results - Disable",
@@ -673,7 +675,7 @@
icacls $Env:OneDrive /grant \"Administrators:(D,DC)\"
if (-not (Get-ChildItem -Path $Env:OneDrive)) {
Remove-Item -Path $Env:OneDrive
Remove-Item -Path $Env:OneDrive -Recurse
[Environment]::SetEnvironmentVariable('OneDrive', $null, 'User')
}
@@ -692,7 +694,7 @@
],
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/removeonedrive"
},
"WPFTweaksRemoveHome": {
"WPFTweaksRemoveHomeAndGallery": {
"Content": "File Explorer Home and Gallery - Disable",
"Description": "Removes the Home and Gallery from Explorer and sets This PC as default.",
"category": "z__Advanced Tweaks - CAUTION",
@@ -705,6 +707,13 @@
"Type": "DWord",
"OriginalValue": "<RemoveEntry>"
},
{
"Path": "HKCU:\\Software\\Classes\\CLSID\\{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}",
"Name": "System.IsPinnedToNameSpaceTree",
"Value": "0",
"Type": "DWord",
"OriginalValue": "<RemoveEntry>"
},
{
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
"Name": "LaunchTo",
@@ -713,7 +722,7 @@
"OriginalValue": "<RemoveEntry>"
}
],
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/removehome"
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/removehomeandgallery"
},
"WPFTweaksDisplay": {
"Content": "Visual Effects - Set to Best Performance",
@@ -970,7 +979,7 @@
Remove-AppxPackage $Appx
Set-Service -Name WSAIFabricSvc -StartupType Disabled
Disable-WindowsOptionalFeature -FeatureName Recall -Online
Disable-WindowsOptionalFeature -FeatureName Recall -Online -NoRestart
Write-Host \"Windows AI Disabled\"
"
@@ -1088,6 +1097,15 @@
"Description": "Restores the classic context menu when right-clicking in File Explorer, replacing the simplified Windows 11 version.",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"registry": [
{
"Path": "HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\\InprocServer32",
"Name": "(default)",
"Value": "",
"Type": "String",
"OriginalValue": "<RemoveEntry>"
}
],
"InvokeScript": [
"
New-Item -Path \"HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\" -Name \"InprocServer32\" -force -value \"\"
@@ -1775,9 +1793,9 @@
{
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Search",
"Name": "SearchboxTaskbarMode",
"Value": "0",
"Value": "1",
"Type": "DWord",
"OriginalValue": "d",
"OriginalValue": "0",
"DefaultState": "true"
}
],
+12
View File
@@ -18,3 +18,15 @@ If you run WinUtil and get the error:
`"WinUtil is unable to run on your system, powershell execution is restricted by security policies,"`
this means that your PowerShell session is in **Constrained Language Mode**, which prevents WinUtil from running.
### Ultimate Performance Plan Not Working
The Ultimate Performance power plan may not work on some laptops who do not fully support this power plan.
In these cases, the power plan may fail to apply, This is expected behavior on unsupported hardware.
### Revet start menu tweak not working
Revet start menu tweak stops working starting with **Windows 11 update KB5089573** (released in May 2026).
In this update, Microsoft completely removed the old Start Menu code from Windows so we aren't able to bring it back
@@ -3,7 +3,7 @@ title: "System Tray Battery Percentage"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1307}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1325}
"WPFToggleBatteryPercentage": {
"Content": "System Tray Battery Percentage",
"Description": "Shows numeric battery percentage next to the battery icon in the system tray.",
@@ -3,7 +3,7 @@ title: "Start Menu Bing Search"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1642}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1660}
"WPFToggleBingSearch": {
"Content": "Start Menu Bing Search",
"Description": "Toggles Bing web search results in windows search",
@@ -3,7 +3,7 @@ title: "Dark Theme for Windows"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1325}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1343}
"WPFToggleDarkMode": {
"Content": "Dark Theme for Windows",
"Description": "Dark Mode for the system and applications.",
@@ -3,7 +3,7 @@ title: "BSoD Verbose Mode"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1281}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1299}
"WPFToggleDetailedBSoD": {
"Content": "BSoD Verbose Mode",
"Description": "Gives more information when you blue screen.",
@@ -3,7 +3,7 @@ title: "Game Mode"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1804}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1822}
"WPFToggleGameMode": {
"Content": "Game Mode",
"Description": "Toggles Windows prioritizes gaming performance by allocating system resources to games.",
@@ -3,7 +3,7 @@ title: "File Explorer Hidden Files"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1395}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1413}
"WPFToggleHiddenFiles": {
"Content": "File Explorer Hidden Files",
"Description": "reveals hidden files in explorer",
@@ -3,7 +3,7 @@ title: "Settings Home Page"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1624}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1642}
"WPFToggleHideSettingsHome": {
"Content": "Settings Home Page",
"Description": "Toggles the Home Page in the Windows Settings app.",
@@ -3,7 +3,7 @@ title: "Logon Screen Acrylic Blur"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1660}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1678}
"WPFToggleLoginBlur": {
"Content": "Logon Screen Acrylic Blur",
"Description": "Toggles the acrylic blur effect on login screen background.",
@@ -3,7 +3,7 @@ title: "Enable Long Paths"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1830}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1848}
"WPFToggleLongPaths": {
"Content": "Enable Long Paths",
"Description": "Toggles support for file paths longer than 260 characters in explorer.",
@@ -3,7 +3,7 @@ title: "Mouse Acceleration"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1528}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1546}
"WPFToggleMouseAcceleration": {
"Content": "Mouse Acceleration",
"Description": "Makes it so Cursor movement is affected by the speed of your physical mouse movements.",
@@ -3,7 +3,7 @@ title: "Multiplane Overlay"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1502}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1520}
"WPFToggleMultiplaneOverlay": {
"Content": "Multiplane Overlay",
"Description": "Multiplane Overlay compose multiple image layers, which can sometimes cause issues with graphics cards.",
@@ -3,7 +3,7 @@ title: "Microsoft Outlook New Version"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1441}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1459}
"WPFToggleNewOutlook": {
"Content": "Microsoft Outlook New Version",
"Description": "This will ensures the classic Outlook application is used.",
@@ -3,7 +3,7 @@ title: "Num Lock on Startup"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1562}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1580}
"WPFToggleNumLock": {
"Content": "Num Lock on Startup",
"Description": "Toggle the Num Lock key state when your computer starts.",
@@ -3,7 +3,7 @@ title: "S3 Sleep"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1606}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1624}
"WPFToggleS3Sleep": {
"Content": "S3 Sleep",
"Description": "Toggles between Modern Standby and S3 Sleep which cuts of power to cpu while continuing to refreshes the memory.",
@@ -3,7 +3,7 @@ title: "File Explorer File Extensions"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1367}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1385}
"WPFToggleShowExt": {
"Content": "File Explorer File Extensions",
"Description": "Shows .file extensions in explorer (.exe, .png, etc)",
@@ -3,7 +3,7 @@ title: "S0 Sleep Network Connectivity"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1588}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1606}
"WPFToggleStandbyFix": {
"Content": "S0 Sleep Network Connectivity",
"Description": "Toggles network connectivity during S0 Sleep which is low power idle in modern laptops.",
@@ -3,7 +3,7 @@ title: "Start Menu Recommendations"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1678}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1696}
"WPFToggleStartMenuRecommendations": {
"Content": "Start Menu Recommendations",
"Description": "Toggles the recommendations section in the Start Menu. WARNING: This will also disable Windows Spotlight on your Lock Screen as a side effect.",
@@ -3,7 +3,7 @@ title: "Sticky Keys"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1722}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1740}
"WPFToggleStickyKeys": {
"Content": "Sticky Keys",
"Description": "Toggles the stick keys which active when clicking shift rapidly",
@@ -3,7 +3,7 @@ title: "Taskbar Task View Icon"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1786}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1804}
"WPFToggleTaskView": {
"Content": "Taskbar Task View Icon",
"Description": "Toggles the Task View Button in the Taskbar.",
@@ -3,7 +3,7 @@ title: "Taskbar Centered Icons"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1740}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1758}
"WPFToggleTaskbarAlignment": {
"Content": "Taskbar Centered Icons",
"Description": "Toggles the taskbar alignment either to the left or center",
@@ -3,7 +3,7 @@ title: "Taskbar Search Icon"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1768}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1786}
"WPFToggleTaskbarSearch": {
"Content": "Taskbar Search Icon",
"Description": "Toggles the Search Button on the Taskbar.",
@@ -14,9 +14,9 @@ description: ""
{
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Search",
"Name": "SearchboxTaskbarMode",
"Value": "0",
"Value": "1",
"Type": "DWord",
"OriginalValue": "d",
"OriginalValue": "0",
"DefaultState": "true"
}
],
@@ -3,7 +3,7 @@ title: "Logon Verbose Mode"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1423}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1441}
"WPFToggleVerboseLogon": {
"Content": "Logon Verbose Mode",
"Description": "Show detailed messages during startup/shutdown.",
@@ -3,7 +3,7 @@ title: "ConsumerFeatures - Disable"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=449}
```json {filename="config/tweaks.json",linenos=inline,linenostart=451}
"WPFTweaksConsumerFeatures": {
"Content": "ConsumerFeatures - Disable",
"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).",
@@ -3,7 +3,7 @@ title: "Unwanted Pre-Installed Apps - Remove"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=840}
```json {filename="config/tweaks.json",linenos=inline,linenostart=849}
"WPFTweaksDeBloat": {
"Content": "Unwanted Pre-Installed Apps - Remove",
"Description": "This will remove a bunch of Windows pre-installed applications which most people dont want on their system.",
@@ -3,7 +3,7 @@ title: "Temporary Files - Remove"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1121}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1139}
"WPFTweaksDeleteTempFiles": {
"Content": "Temporary Files - Remove",
"Description": "Erases TEMP Folders.",
@@ -3,7 +3,7 @@ title: "Delivery Optimization - Disable"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=590}
```json {filename="config/tweaks.json",linenos=inline,linenostart=592}
"WPFTweaksDeliveryOptimization": {
"Content": "Delivery Optimization - Disable",
"Description": "Stops Windows from using your bandwidth to upload updates to other PCs on the internet or local network.",
@@ -3,7 +3,7 @@ title: "BitLocker - Disable"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=622}
```json {filename="config/tweaks.json",linenos=inline,linenostart=624}
"WPFTweaksDisableBitLocker": {
"Content": "BitLocker - Disable",
"Description": "Disables BitLocker.",
@@ -3,7 +3,7 @@ title: "File Explorer Automatic Folder Discovery - Disable"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1226}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1244}
"WPFTweaksDisableExplorerAutoDiscovery": {
"Content": "File Explorer Automatic Folder Discovery - Disable",
"Description": "Windows Explorer automatically tries to guess the type of the folder based on its contents, slowing down the browsing experience. WARNING! Will disable File Explorer grouping.",
@@ -3,7 +3,7 @@ title: "Microsoft Store Recommended Search Results - Disable"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=115}
```json {filename="config/tweaks.json",linenos=inline,linenostart=117}
"WPFTweaksDisableStoreSearch": {
"Content": "Microsoft Store Recommended Search Results - Disable",
"Description": "Will not display recommended Microsoft Store apps when searching for apps in the Start menu.",
@@ -3,7 +3,7 @@ title: "Disk Cleanup - Run"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1108}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1126}
"WPFTweaksDiskCleanup": {
"Content": "Disk Cleanup - Run",
"Description": "Runs Disk Cleanup on Drive C: and removes old Windows Updates.",
@@ -3,7 +3,7 @@ title: "End Task With Right Click - Enable"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=908}
```json {filename="config/tweaks.json",linenos=inline,linenostart=917}
"WPFTweaksEndTaskOnTaskbar": {
"Content": "End Task With Right Click - Enable",
"Description": "Enables option to end task when right clicking a program in the taskbar.",
@@ -3,7 +3,7 @@ title: "Location Tracking - Disable"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=128}
```json {filename="config/tweaks.json",linenos=inline,linenostart=130}
"WPFTweaksLocation": {
"Content": "Location Tracking - Disable",
"Description": "Disables Location Tracking.",
@@ -3,7 +3,7 @@ title: "Restore Point - Create"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=881}
```json {filename="config/tweaks.json",linenos=inline,linenostart=890}
"WPFTweaksRestorePoint": {
"Content": "Restore Point - Create",
"Description": "Creates a restore point at runtime in case a revert is needed from WinUtil modifications.",
@@ -3,38 +3,3 @@ title: "Start Menu Previous Layout - Enable"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=80}
"WPFTweaksRevertStartMenu": {
"Content": "Start Menu Previous Layout - Enable",
"Description": "Bring back the old Start Menu layout from before the gradual rollout of the new one in 25H2.",
"category": "Essential Tweaks",
"panel": "1",
"InvokeScript": [
"
Invoke-WebRequest https://github.com/thebookisclosed/ViVe/releases/download/v0.3.4/ViVeTool-v0.3.4-IntelAmd.zip -OutFile ViVeTool.zip
Expand-Archive ViVeTool.zip
Remove-Item ViVeTool.zip
Start-Process 'ViVeTool\\ViVeTool.exe' -ArgumentList '/disable /id:47205210' -Wait -NoNewWindow
Remove-Item ViVeTool -Recurse
Write-Host 'Old start menu reverted. Please restart your computer to take effect.'
"
],
"UndoScript": [
"
Invoke-WebRequest https://github.com/thebookisclosed/ViVe/releases/download/v0.3.4/ViVeTool-v0.3.4-IntelAmd.zip -OutFile ViVeTool.zip
Expand-Archive ViVeTool.zip
Remove-Item ViVeTool.zip
Start-Process 'ViVeTool\\ViVeTool.exe' -ArgumentList '/enable /id:47205210' -Wait -NoNewWindow
Remove-Item ViVeTool -Recurse
Write-Host 'New start menu reverted. Please restart your computer to take effect.'
"
],
```
@@ -3,7 +3,7 @@ title: "Services - Set to Manual"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=165}
```json {filename="config/tweaks.json",linenos=inline,linenostart=167}
"WPFTweaksServices": {
"Content": "Services - Set to Manual",
"Description": "Sets some services to Manual startup and adjusts the SvcHostSplitThresholdInKB registry value to better match system memory, which can significantly reduce the number of svchost.exe processes.",
@@ -3,7 +3,7 @@ title: "Telemetry - Disable"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=465}
```json {filename="config/tweaks.json",linenos=inline,linenostart=467}
"WPFTweaksTelemetry": {
"Content": "Telemetry - Disable",
"Description": "Disables Microsoft Telemetry.",
@@ -3,7 +3,7 @@ title: "Windows Platform Binary Table (WPBT) - Disable"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=980}
```json {filename="config/tweaks.json",linenos=inline,linenostart=989}
"WPFTweaksWPBT": {
"Content": "Windows Platform Binary Table (WPBT) - Disable",
"Description": "If enabled, WPBT allows your computer vendor to execute programs at boot time, such as anti-theft software, software drivers, as well as force install software without user consent. Poses potential security risk.",
@@ -3,7 +3,7 @@ title: "Adobe URL Block List - Enable"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1060}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1069}
"WPFTweaksBlockAdobeNet": {
"Content": "Adobe URL Block List - Enable",
"Description": "Reduces user interruptions by selectively blocking connections to Adobe's activation and telemetry servers. Credit: Ruddernation-Designs",
@@ -3,7 +3,7 @@ title: "Brave Browser - Debloat"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=205}
```json {filename="config/tweaks.json",linenos=inline,linenostart=207}
"WPFTweaksBraveDebloat": {
"Content": "Brave Browser - Debloat",
"Description": "Disables various annoyances like Brave Rewards, Leo AI, Crypto Wallet and VPN.",
@@ -3,7 +3,7 @@ title: "Background Apps - Disable"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1194}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1212}
"WPFTweaksDisableBGapps": {
"Content": "Background Apps - Disable",
"Description": "Disables all Microsoft Store apps from running in the background, which has to be done individually since Windows 11.",
@@ -3,7 +3,7 @@ title: "Fullscreen Optimizations - Disable"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1210}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1228}
"WPFTweaksDisableFSO": {
"Content": "Fullscreen Optimizations - Disable",
"Description": "Disables FSO in all applications. NOTE: This will disable Color Management in Exclusive Fullscreen.",
@@ -3,7 +3,7 @@ title: "IPv6 - Disable"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1172}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1190}
"WPFTweaksDisableIPv6": {
"Content": "IPv6 - Disable",
"Description": "Disables IPv6.",
@@ -3,7 +3,7 @@ title: "System Tray Notifications & Calendar - Disable"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1037}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1046}
"WPFTweaksDisableNotifications": {
"Content": "System Tray Notifications & Calendar - Disable",
"Description": "Disables all Notifications INCLUDING Calendar.",
@@ -3,7 +3,7 @@ title: "RDP Unsigned File Warnings - Disable"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=298}
```json {filename="config/tweaks.json",linenos=inline,linenostart=300}
"WPFTweaksDisableWarningForUnsignedRdp": {
"Content": "RDP Unsigned File Warnings - Disable",
"Description": "Disables warnings shown when launching unsigned RDP files introduced with the latest Windows 10 and 11 updates.",
@@ -3,7 +3,7 @@ title: "Visual Effects - Set to Best Performance"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=718}
```json {filename="config/tweaks.json",linenos=inline,linenostart=727}
"WPFTweaksDisplay": {
"Content": "Visual Effects - Set to Best Performance",
"Description": "Sets the system preferences to performance. You can do this manually with sysdm.cpl as well.",
@@ -3,7 +3,7 @@ title: "Microsoft Edge - Debloat"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=321}
```json {filename="config/tweaks.json",linenos=inline,linenostart=323}
"WPFTweaksEdgeDebloat": {
"Content": "Microsoft Edge - Debloat",
"Description": "Disables various telemetry options, popups, and other annoyances in Edge.",
@@ -3,7 +3,7 @@ title: "IPv6 - Set IPv4 as Preferred"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1134}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1152}
"WPFTweaksIPv46": {
"Content": "IPv6 - Set IPv4 as Preferred",
"Description": "Setting the IPv4 preference can have latency and security benefits on private networks where IPv6 is not configured.",
@@ -3,7 +3,7 @@ title: "Razer Software Auto-Install - Disable"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=996}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1005}
"WPFTweaksRazerBlock": {
"Content": "Razer Software Auto-Install - Disable",
"Description": "Blocks ALL Razer Software installations. The hardware works fine without any software.",
@@ -3,7 +3,7 @@ title: "Microsoft Edge - Remove"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=606}
```json {filename="config/tweaks.json",linenos=inline,linenostart=608}
"WPFTweaksRemoveEdge": {
"Content": "Microsoft Edge - Remove",
"Description": "Unblocks Microsoft Edge uninstaller restrictions then uses that uninstaller to remove Microsoft Edge.",
@@ -3,8 +3,8 @@ title: "File Explorer Home and Gallery - Disable"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=695}
"WPFTweaksRemoveHome": {
```json {filename="config/tweaks.json",linenos=inline,linenostart=697}
"WPFTweaksRemoveHomeAndGallery": {
"Content": "File Explorer Home and Gallery - Disable",
"Description": "Removes the Home and Gallery from Explorer and sets This PC as default.",
"category": "z__Advanced Tweaks - CAUTION",
@@ -17,6 +17,13 @@ description: ""
"Type": "DWord",
"OriginalValue": "<RemoveEntry>"
},
{
"Path": "HKCU:\\Software\\Classes\\CLSID\\{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}",
"Name": "System.IsPinnedToNameSpaceTree",
"Value": "0",
"Type": "DWord",
"OriginalValue": "<RemoveEntry>"
},
{
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
"Name": "LaunchTo",
@@ -3,7 +3,7 @@ title: "Microsoft OneDrive - Remove"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=651}
```json {filename="config/tweaks.json",linenos=inline,linenostart=653}
"WPFTweaksRemoveOneDrive": {
"Content": "Microsoft OneDrive - Remove",
"Description": "Denies permission to remove OneDrive user files, then uses its own uninstaller to remove it and restores the original permission afterward.",
@@ -29,7 +29,7 @@ description: ""
icacls $Env:OneDrive /grant \"Administrators:(D,DC)\"
if (-not (Get-ChildItem -Path $Env:OneDrive)) {
Remove-Item -Path $Env:OneDrive
Remove-Item -Path $Env:OneDrive -Recurse
[Environment]::SetEnvironmentVariable('OneDrive', $null, 'User')
}
@@ -3,12 +3,21 @@ title: "Right-Click Menu Previous Layout - Enable"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1086}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1095}
"WPFTweaksRightClickMenu": {
"Content": "Right-Click Menu Previous Layout - Enable",
"Description": "Restores the classic context menu when right-clicking in File Explorer, replacing the simplified Windows 11 version.",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"registry": [
{
"Path": "HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\\InprocServer32",
"Name": "(default)",
"Value": "",
"Type": "String",
"OriginalValue": "<RemoveEntry>"
}
],
"InvokeScript": [
"
New-Item -Path \"HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\" -Name \"InprocServer32\" -force -value \"\"
@@ -25,3 +34,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://en.wikipedia.org/wiki/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).
@@ -3,7 +3,7 @@ title: "Storage Sense - Disable"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=924}
```json {filename="config/tweaks.json",linenos=inline,linenostart=933}
"WPFTweaksStorage": {
"Content": "Storage Sense - Disable",
"Description": "Storage Sense deletes temp files automatically.",
@@ -3,7 +3,7 @@ title: "Teredo - Disable"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1150}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1168}
"WPFTweaksTeredo": {
"Content": "Teredo - Disable",
"Description": "Teredo network tunneling is an IPv6 feature that can cause additional latency, but may cause problems with some games.",
@@ -3,7 +3,7 @@ title: "Date & Time - Set Time to UTC"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=635}
```json {filename="config/tweaks.json",linenos=inline,linenostart=637}
"WPFTweaksUTC": {
"Content": "Date & Time - Set Time to UTC",
"Description": "Essential for computers that are dual booting. Fixes the time sync with Linux systems.",
@@ -3,7 +3,7 @@ title: "Windows AI - Disable"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=940}
```json {filename="config/tweaks.json",linenos=inline,linenostart=949}
"WPFTweaksWindowsAI": {
"Content": "Windows AI - Disable",
"Description": "Removes or disables all ai features and packages",
@@ -37,7 +37,7 @@ description: ""
Remove-AppxPackage $Appx
Set-Service -Name WSAIFabricSvc -StartupType Disabled
Disable-WindowsOptionalFeature -FeatureName Recall -Online
Disable-WindowsOptionalFeature -FeatureName Recall -Online -NoRestart
Write-Host \"Windows AI Disabled\"
"
@@ -3,7 +3,7 @@ title: "Xbox & Gaming Components - Remove"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=817}
```json {filename="config/tweaks.json",linenos=inline,linenostart=826}
"WPFTweaksXboxRemoval": {
"Content": "Xbox & Gaming Components - Remove",
"Description": "Removes Xbox services, the Xbox app, Game Bar, and related authentication components.",
@@ -3,7 +3,7 @@ title: "DNS - Set to:"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1855}
```json {filename="config/tweaks.json",linenos=inline,linenostart=1873}
"WPFchangedns": {
"Content": "DNS - Set to:",
"category": "z__Advanced Tweaks - CAUTION",
@@ -23,9 +23,9 @@ function Find-TweaksByNameOrDescription {
[string]$SearchString = ""
)
# ──────────────────────────────────────────────────────────────────────────────
# ------------------------------------------------------------------------------
# 1. RESOLVE $SYNC WITH MULTI-LEVEL FALLBACK
# ──────────────────────────────────────────────────────────────────────────────
# ------------------------------------------------------------------------------
if ($null -eq $Sync) {
$Sync = $global:sync
@@ -45,9 +45,9 @@ function Find-TweaksByNameOrDescription {
return
}
# ──────────────────────────────────────────────────────────────────────────────
# ------------------------------------------------------------------------------
# 2. GET REFERENCE TO TWEAKS PANEL
# ──────────────────────────────────────────────────────────────────────────────
# ------------------------------------------------------------------------------
$tweaksPanel = $null
try {
@@ -63,9 +63,9 @@ function Find-TweaksByNameOrDescription {
return
}
# ──────────────────────────────────────────────────────────────────────────────
# ------------------------------------------------------------------------------
# 3. HANDLE EMPTY/WHITESPACE SEARCH STRING - RESET TO DEFAULT STATE
# ──────────────────────────────────────────────────────────────────────────────
# ------------------------------------------------------------------------------
if ([string]::IsNullOrWhiteSpace($SearchString)) {
try {
@@ -114,9 +114,9 @@ function Find-TweaksByNameOrDescription {
return
}
# ──────────────────────────────────────────────────────────────────────────────
# ------------------------------------------------------------------------------
# 4. PERFORM LITERAL SEARCH (NO WILDCARD EXPANSION)
# ──────────────────────────────────────────────────────────────────────────────
# ------------------------------------------------------------------------------
try {
# Normalize search term once for the entire operation
@@ -151,9 +151,9 @@ function Find-TweaksByNameOrDescription {
continue
}
# ────────────────────────────────────────────────────────────
# ------------------------------------------------------------
# Check if this is a category label (usually first Label)
# ────────────────────────────────────────────────────────────
# ------------------------------------------------------------
if ($item -is [Windows.Controls.Label]) {
$categoryLabel = $item
@@ -161,9 +161,9 @@ function Find-TweaksByNameOrDescription {
$item.Visibility = [Windows.Visibility]::Collapsed
}
# ────────────────────────────────────────────────────────────
# ------------------------------------------------------------
# Check if this is a DockPanel containing a tweak checkbox
# ────────────────────────────────────────────────────────────
# ------------------------------------------------------------
elseif ($item -is [Windows.Controls.DockPanel]) {
$checkbox = $null
@@ -211,9 +211,9 @@ function Find-TweaksByNameOrDescription {
}
}
# ────────────────────────────────────────────────────────────
# ------------------------------------------------------------
# Check if this is a StackPanel containing a tweak checkbox
# ────────────────────────────────────────────────────────────
# ------------------------------------------------------------
elseif ($item -is [Windows.Controls.StackPanel]) {
$checkbox = $null
@@ -257,9 +257,9 @@ function Find-TweaksByNameOrDescription {
}
}
# ────────────────────────────────────────────────────────────
# ------------------------------------------------------------
# Update category label visibility and expanded/collapsed state
# ────────────────────────────────────────────────────────────
# ------------------------------------------------------------
if ($categoryHasMatch) {
# Show category label
@@ -282,9 +282,9 @@ function Find-TweaksByNameOrDescription {
}
}
# ────────────────────────────────────────────────────────────────
# ----------------------------------------------------------------
# Set category border visibility based on whether it has matches
# ────────────────────────────────────────────────────────────────
# ----------------------------------------------------------------
if ($categoryHasMatch) {
$categoryBorder.Visibility = [Windows.Visibility]::Visible
+2 -2
View File
@@ -65,7 +65,7 @@ function Invoke-WinUtilISOMountAndVerify {
if (-not (Test-Path $wimPath) -and -not (Test-Path $esdPath)) {
Dismount-DiskImage -ImagePath $isoPath
Write-Win11ISOLog "ERROR: install.wim/install.esd not found not a valid Windows ISO."
Write-Win11ISOLog "ERROR: install.wim/install.esd not found - not a valid Windows ISO."
[System.Windows.MessageBox]::Show(
"This does not appear to be a valid Windows ISO.`n`ninstall.wim / install.esd was not found.",
"Invalid ISO", "OK", "Error")
@@ -547,7 +547,7 @@ function Invoke-WinUtilISOCleanAndReset {
Log "Temp directory deleted successfully."
}
} else {
Log "No temp directory found resetting UI."
Log "No temp directory found - resetting UI."
}
SetProgress "Resetting UI..." 95
@@ -108,7 +108,7 @@ function Invoke-WinUtilISOScript {
}
}
# ── 1. Remove provisioned AppX packages ──────────────────────────────────
# -- 1. Remove provisioned AppX packages ----------------------------------
& $Log "Removing provisioned AppX packages..."
$packages = & dism /English "/image:$ScratchDir" /Get-ProvisionedAppxPackages |
@@ -139,7 +139,7 @@ function Invoke-WinUtilISOScript {
$packages | Where-Object { $pkg = $_; $packagePrefixes | Where-Object { $pkg -like "*$_*" } } |
ForEach-Object { & dism /English "/image:$ScratchDir" /Remove-ProvisionedAppxPackage "/PackageName:$_" }
# ── 2. Inject current system drivers (optional) ───────────────────────────
# -- 2. Inject current system drivers (optional) ---------------------------
if ($InjectCurrentSystemDrivers) {
& $Log "Exporting all drivers from running system..."
$driverExportRoot = Join-Path $env:TEMP "WinUtil_DriverExport_$(Get-Random)"
@@ -157,7 +157,7 @@ function Invoke-WinUtilISOScript {
& $Log "Injecting current system drivers into boot.wim..."
Invoke-BootWimInject -BootWimPath $bootWim -DriverDir $driverExportRoot -Logger $Log
} else {
& $Log "Warning: boot.wim not found skipping boot.wim driver injection."
& $Log "Warning: boot.wim not found - skipping boot.wim driver injection."
}
}
} catch {
@@ -169,7 +169,7 @@ function Invoke-WinUtilISOScript {
& $Log "Driver injection skipped."
}
# ── 3. Registry tweaks ────────────────────────────────────────────────────
# -- 3. Registry tweaks ----------------------------------------------------
& $Log "Loading offline registry hives..."
reg load HKLM\zCOMPONENTS "$ScratchDir\Windows\System32\config\COMPONENTS"
reg load HKLM\zDEFAULT "$ScratchDir\Windows\System32\config\default"
@@ -243,7 +243,7 @@ function Invoke-WinUtilISOScript {
& $Log "Pre-staged setup script: $relPath"
}
} else {
& $Log "Warning: no <Extensions><File> nodes found in autounattend.xml setup scripts not pre-staged."
& $Log "Warning: no <Extensions><File> nodes found in autounattend.xml - setup scripts not pre-staged."
}
} catch {
& $Log "Warning: could not pre-stage setup scripts from autounattend.xml: $_"
@@ -255,7 +255,7 @@ function Invoke-WinUtilISOScript {
& $Log "Written autounattend.xml to ISO root ($isoDest)."
}
} else {
& $Log "Warning: autounattend.xml content is empty skipping OOBE bypass file."
& $Log "Warning: autounattend.xml content is empty - skipping OOBE bypass file."
}
& $Log "Disabling reserved storage..."
@@ -323,7 +323,7 @@ function Invoke-WinUtilISOScript {
reg unload HKLM\zSOFTWARE
reg unload HKLM\zSYSTEM
# ── 4. Delete scheduled task definition files ─────────────────────────────
# -- 4. Delete scheduled task definition files -----------------------------
& $Log "Deleting scheduled task definition files..."
$tasksPath = "$ScratchDir\Windows\System32\Tasks"
Remove-Item "$tasksPath\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" -Force
@@ -339,7 +339,7 @@ function Invoke-WinUtilISOScript {
Remove-Item "$tasksPath\Microsoft\WindowsUpdate" -Recurse -Force
& $Log "Scheduled task files deleted."
# ── 5. Remove ISO support folder ─────────────────────────────────────────
# -- 5. Remove ISO support folder -----------------------------------------
if ($ISOContentsDir -and (Test-Path $ISOContentsDir)) {
& $Log "Removing ISO support\ folder..."
Remove-Item -Path (Join-Path $ISOContentsDir "support") -Recurse -Force
+1 -1
View File
@@ -50,7 +50,7 @@ function Reset-WPFCheckBoxes {
if($doToggles) {
# Restore toggle switch states from imported config.
# Only act on toggles that are explicitly listed in the import toggles absent
# Only act on toggles that are explicitly listed in the import - toggles absent
# from the export file were not part of the saved config and should keep whatever
# state the live system already has (set during UI initialisation via Get-WinUtilToggleStatus).
$importedToggles = $sync.selectedToggles
@@ -14,10 +14,6 @@ function Set-WinUtilProgressbar{
[int]$Percent
)
if($PARAM_NOUI) {
return;
}
Invoke-WPFUIThread -ScriptBlock {$sync.progressBarTextBlock.Text = $label}
Invoke-WPFUIThread -ScriptBlock {$sync.progressBarTextBlock.ToolTip = $label}
if ($percent -lt 5 ) {
-11
View File
@@ -92,17 +92,6 @@ function Invoke-WPFImpex {
$sync.selectedFeatures = [System.Collections.Generic.List[string]]::new()
Update-WinUtilSelections -flatJson $flattenedJson
if (!$PARAM_NOUI) {
# Set flag so toggle Checked/Unchecked events don't trigger registry writes
# while we're programmatically restoring UI state from the imported config
$sync.ImportInProgress = $true
try {
Reset-WPFCheckBoxes -doToggles $true
} finally {
$sync.ImportInProgress = $false
}
}
}
} catch {
Write-Error "An error occurred while importing: $_"
+1 -19
View File
@@ -1,21 +1,3 @@
function Invoke-WPFUIThread {
<#
.SYNOPSIS
Creates and runs a task on Winutil's WPF Forms thread.
.PARAMETER ScriptBlock
The scriptblock to invoke in the thread
#>
[CmdletBinding()]
Param (
$ScriptBlock
)
if ($PARAM_NOUI) {
return;
}
function Invoke-WPFUIThread ($ScriptBlock) {
$sync.form.Dispatcher.Invoke([action]$ScriptBlock)
}
+17 -42
View File
@@ -35,13 +35,11 @@ $maxthreads = [int]$env:NUMBER_OF_PROCESSORS
# Create a new session state for parsing variables into our runspace
$hashVars = New-object System.Management.Automation.Runspaces.SessionStateVariableEntry -ArgumentList 'sync',$sync,$Null
$uiVar = New-object System.Management.Automation.Runspaces.SessionStateVariableEntry -ArgumentList 'PARAM_NOUI',$PARAM_NOUI,$Null
$offlineVar = New-object System.Management.Automation.Runspaces.SessionStateVariableEntry -ArgumentList 'PARAM_OFFLINE',$PARAM_OFFLINE,$Null
$InitialSessionState = [System.Management.Automation.Runspaces.InitialSessionState]::CreateDefault()
# Add the variable to the session state
$InitialSessionState.Variables.Add($hashVars)
$InitialSessionState.Variables.Add($uiVar)
$InitialSessionState.Variables.Add($offlineVar)
# Get every private function and add them to the session state
@@ -91,8 +89,6 @@ $sync.configs.applications.PSObject.Properties | ForEach-Object {
Set-Preferences
if ($Preset) {
Show-CTTLogo
# Selects the tweaks from $Preset varible
Update-WinUtilSelections -flatJson $sync.configs.preset.$Preset
@@ -107,27 +103,17 @@ if ($Preset) {
return
}
if ($PARAM_NOUI) {
Show-CTTLogo
if ($PARAM_CONFIG -and -not [string]::IsNullOrWhiteSpace($PARAM_CONFIG)) {
Write-Host "Running config file tasks..."
Invoke-WPFImpex -type "import" -Config $PARAM_CONFIG
Invoke-WinUtilAutoRun
if ($Config) {
Invoke-WPFImpex -type "import" -Config $Config
$sync.runspace.Dispose()
$sync.runspace.Close()
[System.GC]::Collect()
Stop-Transcript
exit 1
}
else {
Write-Host "Cannot automatically run without a config file provided."
$sync.runspace.Dispose()
$sync.runspace.Close()
[System.GC]::Collect()
Stop-Transcript
exit 1
}
Invoke-WinUtilAutoRun
# Cleanup and exit
$sync.runspace.Dispose()
$sync.runspace.Close()
[System.GC]::Collect()
Stop-Transcript
return
}
$inputXML = $inputXML -replace 'mc:Ignorable="d"', '' -replace "x:N", 'N' -replace '^<Win.*', '<Window'
@@ -400,27 +386,16 @@ $sync["Form"].Add_ContentRendered({
Invoke-WPFTab "WPFTab1BT" # Default to install tab
}
if (-not $PARAM_CONFIG -and (Test-Path "$winutildir\lastrun.json")) {
try {
$drifted = @(Get-Content "$winutildir\lastrun.json" | ConvertFrom-Json | Where-Object { $_ -notin (Invoke-WinUtilCurrentSystem -CheckBox "tweaks") })
if ($drifted.Count -gt 0 -and [System.Windows.MessageBox]::Show("$($drifted.Count) tweak(s) were reverted since last run. Re-select them?", "Winutil", "YesNo", "Question") -eq "Yes") {
Update-WinUtilSelections -flatJson $drifted
Reset-WPFCheckBoxes -doToggles $false
Invoke-WPFTab "WPFTab2BT"
}
} catch {}
}
$sync["Form"].Focus()
if ($PARAM_CONFIG -and -not [string]::IsNullOrWhiteSpace($PARAM_CONFIG)) {
Write-Host "Running config file tasks..."
Invoke-WPFImpex -type "import" -Config $PARAM_CONFIG
Invoke-WPFRunspace -ScriptBlock {
Invoke-WinUtilAutoRun
if (-not $Config -and (Test-Path "$winutildir\lastrun.json")) {
$drifted = @(Get-Content "$winutildir\lastrun.json" | ConvertFrom-Json | Where-Object { $_ -notin (Invoke-WinUtilCurrentSystem -CheckBox "tweaks") })
if ($drifted.Count -gt 0 -and [System.Windows.MessageBox]::Show("$($drifted.Count) tweak(s) were reverted since last run. Re-select them?", "Winutil", "YesNo", "Question") -eq "Yes") {
Update-WinUtilSelections -flatJson $drifted
Reset-WPFCheckBoxes -doToggles $false
Invoke-WPFTab "WPFTab2BT"
}
}
$sync["Form"].Focus()
})
# The SearchBarTimer is used to delay the search operation until the user has stopped typing for a short period
+1 -11
View File
@@ -8,21 +8,11 @@
param (
[string]$Config,
[ValidateSet("Standard", "Minimal", "Advanced")]
[ValidateSet("Standard", "Minimal", "Advanced", "")]
[string]$Preset,
[switch]$Noui,
[switch]$Offline
)
if ($Config) {
$PARAM_CONFIG = $Config
}
$PARAM_NOUI = $false
if ($Noui) {
$PARAM_NOUI = $true
}
$PARAM_OFFLINE = $false
if ($Offline) {
$PARAM_OFFLINE = $true