Compare commits

...
8 Commits
Author SHA1 Message Date
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
66 changed files with 134 additions and 184 deletions
+1
View File
@@ -5,6 +5,7 @@
- [ ] New feature - [ ] New feature
- [ ] Bug fix - [ ] Bug fix
- [ ] Documentation update - [ ] Documentation update
- [ ] Refactor
- [ ] UI/UX improvement - [ ] UI/UX improvement
<!-- This automatically adds labels to your PR based on the selections above. --> <!-- This automatically adds labels to your PR based on the selections above. -->
+23 -5
View File
@@ -77,9 +77,9 @@
], ],
"link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/widget" "link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/widget"
}, },
"WPFTweaksRevertStartMenu": { "WPFTweaksRevertStartMenu": {
"Content": "Start Menu Previous Layout - Enable", "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", "category": "Essential Tweaks",
"panel": "1", "panel": "1",
"InvokeScript": [ "InvokeScript": [
@@ -94,6 +94,7 @@
Remove-Item ViVeTool -Recurse Remove-Item ViVeTool -Recurse
Write-Host 'Old start menu reverted. Please restart your computer to take effect.' 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": [ "UndoScript": [
@@ -110,7 +111,8 @@
Write-Host 'New start menu reverted. Please restart your computer to take effect.' 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": { "WPFTweaksDisableStoreSearch": {
"Content": "Microsoft Store Recommended Search Results - Disable", "Content": "Microsoft Store Recommended Search Results - Disable",
@@ -692,7 +694,7 @@
], ],
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/removeonedrive" "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/removeonedrive"
}, },
"WPFTweaksRemoveHome": { "WPFTweaksRemoveHomeAndGallery": {
"Content": "File Explorer Home and Gallery - Disable", "Content": "File Explorer Home and Gallery - Disable",
"Description": "Removes the Home and Gallery from Explorer and sets This PC as default.", "Description": "Removes the Home and Gallery from Explorer and sets This PC as default.",
"category": "z__Advanced Tweaks - CAUTION", "category": "z__Advanced Tweaks - CAUTION",
@@ -705,6 +707,13 @@
"Type": "DWord", "Type": "DWord",
"OriginalValue": "<RemoveEntry>" "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", "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
"Name": "LaunchTo", "Name": "LaunchTo",
@@ -713,7 +722,7 @@
"OriginalValue": "<RemoveEntry>" "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": { "WPFTweaksDisplay": {
"Content": "Visual Effects - Set to Best Performance", "Content": "Visual Effects - Set to Best Performance",
@@ -1088,6 +1097,15 @@
"Description": "Restores the classic context menu when right-clicking in File Explorer, replacing the simplified Windows 11 version.", "Description": "Restores the classic context menu when right-clicking in File Explorer, replacing the simplified Windows 11 version.",
"category": "z__Advanced Tweaks - CAUTION", "category": "z__Advanced Tweaks - CAUTION",
"panel": "1", "panel": "1",
"registry": [
{
"Path": "HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\\InprocServer32",
"Name": "(default)",
"Value": "",
"Type": "String",
"OriginalValue": "<RemoveEntry>"
}
],
"InvokeScript": [ "InvokeScript": [
" "
New-Item -Path \"HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\" -Name \"InprocServer32\" -force -value \"\" New-Item -Path \"HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\" -Name \"InprocServer32\" -force -value \"\"
+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,"` `"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. 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: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1307} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1325}
"WPFToggleBatteryPercentage": { "WPFToggleBatteryPercentage": {
"Content": "System Tray Battery Percentage", "Content": "System Tray Battery Percentage",
"Description": "Shows numeric battery percentage next to the battery icon in the system tray.", "Description": "Shows numeric battery percentage next to the battery icon in the system tray.",
@@ -3,7 +3,7 @@ title: "Start Menu Bing Search"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1642} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1660}
"WPFToggleBingSearch": { "WPFToggleBingSearch": {
"Content": "Start Menu Bing Search", "Content": "Start Menu Bing Search",
"Description": "Toggles Bing web search results in windows search", "Description": "Toggles Bing web search results in windows search",
@@ -3,7 +3,7 @@ title: "Dark Theme for Windows"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1325} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1343}
"WPFToggleDarkMode": { "WPFToggleDarkMode": {
"Content": "Dark Theme for Windows", "Content": "Dark Theme for Windows",
"Description": "Dark Mode for the system and applications.", "Description": "Dark Mode for the system and applications.",
@@ -3,7 +3,7 @@ title: "BSoD Verbose Mode"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1281} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1299}
"WPFToggleDetailedBSoD": { "WPFToggleDetailedBSoD": {
"Content": "BSoD Verbose Mode", "Content": "BSoD Verbose Mode",
"Description": "Gives more information when you blue screen.", "Description": "Gives more information when you blue screen.",
@@ -3,7 +3,7 @@ title: "Game Mode"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1804} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1822}
"WPFToggleGameMode": { "WPFToggleGameMode": {
"Content": "Game Mode", "Content": "Game Mode",
"Description": "Toggles Windows prioritizes gaming performance by allocating system resources to games.", "Description": "Toggles Windows prioritizes gaming performance by allocating system resources to games.",
@@ -3,7 +3,7 @@ title: "File Explorer Hidden Files"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1395} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1413}
"WPFToggleHiddenFiles": { "WPFToggleHiddenFiles": {
"Content": "File Explorer Hidden Files", "Content": "File Explorer Hidden Files",
"Description": "reveals hidden files in explorer", "Description": "reveals hidden files in explorer",
@@ -3,7 +3,7 @@ title: "Settings Home Page"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1624} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1642}
"WPFToggleHideSettingsHome": { "WPFToggleHideSettingsHome": {
"Content": "Settings Home Page", "Content": "Settings Home Page",
"Description": "Toggles the Home Page in the Windows Settings app.", "Description": "Toggles the Home Page in the Windows Settings app.",
@@ -3,7 +3,7 @@ title: "Logon Screen Acrylic Blur"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1660} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1678}
"WPFToggleLoginBlur": { "WPFToggleLoginBlur": {
"Content": "Logon Screen Acrylic Blur", "Content": "Logon Screen Acrylic Blur",
"Description": "Toggles the acrylic blur effect on login screen background.", "Description": "Toggles the acrylic blur effect on login screen background.",
@@ -3,7 +3,7 @@ title: "Enable Long Paths"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1830} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1848}
"WPFToggleLongPaths": { "WPFToggleLongPaths": {
"Content": "Enable Long Paths", "Content": "Enable Long Paths",
"Description": "Toggles support for file paths longer than 260 characters in explorer.", "Description": "Toggles support for file paths longer than 260 characters in explorer.",
@@ -3,7 +3,7 @@ title: "Mouse Acceleration"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1528} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1546}
"WPFToggleMouseAcceleration": { "WPFToggleMouseAcceleration": {
"Content": "Mouse Acceleration", "Content": "Mouse Acceleration",
"Description": "Makes it so Cursor movement is affected by the speed of your physical mouse movements.", "Description": "Makes it so Cursor movement is affected by the speed of your physical mouse movements.",
@@ -3,7 +3,7 @@ title: "Multiplane Overlay"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1502} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1520}
"WPFToggleMultiplaneOverlay": { "WPFToggleMultiplaneOverlay": {
"Content": "Multiplane Overlay", "Content": "Multiplane Overlay",
"Description": "Multiplane Overlay compose multiple image layers, which can sometimes cause issues with graphics cards.", "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: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1441} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1459}
"WPFToggleNewOutlook": { "WPFToggleNewOutlook": {
"Content": "Microsoft Outlook New Version", "Content": "Microsoft Outlook New Version",
"Description": "This will ensures the classic Outlook application is used.", "Description": "This will ensures the classic Outlook application is used.",
@@ -3,7 +3,7 @@ title: "Num Lock on Startup"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1562} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1580}
"WPFToggleNumLock": { "WPFToggleNumLock": {
"Content": "Num Lock on Startup", "Content": "Num Lock on Startup",
"Description": "Toggle the Num Lock key state when your computer starts.", "Description": "Toggle the Num Lock key state when your computer starts.",
@@ -3,7 +3,7 @@ title: "S3 Sleep"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1606} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1624}
"WPFToggleS3Sleep": { "WPFToggleS3Sleep": {
"Content": "S3 Sleep", "Content": "S3 Sleep",
"Description": "Toggles between Modern Standby and S3 Sleep which cuts of power to cpu while continuing to refreshes the memory.", "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: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1367} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1385}
"WPFToggleShowExt": { "WPFToggleShowExt": {
"Content": "File Explorer File Extensions", "Content": "File Explorer File Extensions",
"Description": "Shows .file extensions in explorer (.exe, .png, etc)", "Description": "Shows .file extensions in explorer (.exe, .png, etc)",
@@ -3,7 +3,7 @@ title: "S0 Sleep Network Connectivity"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1588} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1606}
"WPFToggleStandbyFix": { "WPFToggleStandbyFix": {
"Content": "S0 Sleep Network Connectivity", "Content": "S0 Sleep Network Connectivity",
"Description": "Toggles network connectivity during S0 Sleep which is low power idle in modern laptops.", "Description": "Toggles network connectivity during S0 Sleep which is low power idle in modern laptops.",
@@ -3,7 +3,7 @@ title: "Start Menu Recommendations"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1678} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1696}
"WPFToggleStartMenuRecommendations": { "WPFToggleStartMenuRecommendations": {
"Content": "Start Menu Recommendations", "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.", "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: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1722} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1740}
"WPFToggleStickyKeys": { "WPFToggleStickyKeys": {
"Content": "Sticky Keys", "Content": "Sticky Keys",
"Description": "Toggles the stick keys which active when clicking shift rapidly", "Description": "Toggles the stick keys which active when clicking shift rapidly",
@@ -3,7 +3,7 @@ title: "Taskbar Task View Icon"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1786} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1804}
"WPFToggleTaskView": { "WPFToggleTaskView": {
"Content": "Taskbar Task View Icon", "Content": "Taskbar Task View Icon",
"Description": "Toggles the Task View Button in the Taskbar.", "Description": "Toggles the Task View Button in the Taskbar.",
@@ -3,7 +3,7 @@ title: "Taskbar Centered Icons"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1740} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1758}
"WPFToggleTaskbarAlignment": { "WPFToggleTaskbarAlignment": {
"Content": "Taskbar Centered Icons", "Content": "Taskbar Centered Icons",
"Description": "Toggles the taskbar alignment either to the left or center", "Description": "Toggles the taskbar alignment either to the left or center",
@@ -3,7 +3,7 @@ title: "Taskbar Search Icon"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1768} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1786}
"WPFToggleTaskbarSearch": { "WPFToggleTaskbarSearch": {
"Content": "Taskbar Search Icon", "Content": "Taskbar Search Icon",
"Description": "Toggles the Search Button on the Taskbar.", "Description": "Toggles the Search Button on the Taskbar.",
@@ -3,7 +3,7 @@ title: "Logon Verbose Mode"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1423} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1441}
"WPFToggleVerboseLogon": { "WPFToggleVerboseLogon": {
"Content": "Logon Verbose Mode", "Content": "Logon Verbose Mode",
"Description": "Show detailed messages during startup/shutdown.", "Description": "Show detailed messages during startup/shutdown.",
@@ -3,7 +3,7 @@ title: "ConsumerFeatures - Disable"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=449} ```json {filename="config/tweaks.json",linenos=inline,linenostart=451}
"WPFTweaksConsumerFeatures": { "WPFTweaksConsumerFeatures": {
"Content": "ConsumerFeatures - Disable", "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).", "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: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=840} ```json {filename="config/tweaks.json",linenos=inline,linenostart=849}
"WPFTweaksDeBloat": { "WPFTweaksDeBloat": {
"Content": "Unwanted Pre-Installed Apps - Remove", "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.", "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: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1121} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1139}
"WPFTweaksDeleteTempFiles": { "WPFTweaksDeleteTempFiles": {
"Content": "Temporary Files - Remove", "Content": "Temporary Files - Remove",
"Description": "Erases TEMP Folders.", "Description": "Erases TEMP Folders.",
@@ -3,7 +3,7 @@ title: "Delivery Optimization - Disable"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=590} ```json {filename="config/tweaks.json",linenos=inline,linenostart=592}
"WPFTweaksDeliveryOptimization": { "WPFTweaksDeliveryOptimization": {
"Content": "Delivery Optimization - Disable", "Content": "Delivery Optimization - Disable",
"Description": "Stops Windows from using your bandwidth to upload updates to other PCs on the internet or local network.", "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: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=622} ```json {filename="config/tweaks.json",linenos=inline,linenostart=624}
"WPFTweaksDisableBitLocker": { "WPFTweaksDisableBitLocker": {
"Content": "BitLocker - Disable", "Content": "BitLocker - Disable",
"Description": "Disables BitLocker.", "Description": "Disables BitLocker.",
@@ -3,7 +3,7 @@ title: "File Explorer Automatic Folder Discovery - Disable"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1226} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1244}
"WPFTweaksDisableExplorerAutoDiscovery": { "WPFTweaksDisableExplorerAutoDiscovery": {
"Content": "File Explorer Automatic Folder Discovery - Disable", "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.", "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: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=115} ```json {filename="config/tweaks.json",linenos=inline,linenostart=117}
"WPFTweaksDisableStoreSearch": { "WPFTweaksDisableStoreSearch": {
"Content": "Microsoft Store Recommended Search Results - Disable", "Content": "Microsoft Store Recommended Search Results - Disable",
"Description": "Will not display recommended Microsoft Store apps when searching for apps in the Start menu.", "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: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1108} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1126}
"WPFTweaksDiskCleanup": { "WPFTweaksDiskCleanup": {
"Content": "Disk Cleanup - Run", "Content": "Disk Cleanup - Run",
"Description": "Runs Disk Cleanup on Drive C: and removes old Windows Updates.", "Description": "Runs Disk Cleanup on Drive C: and removes old Windows Updates.",
@@ -3,7 +3,7 @@ title: "End Task With Right Click - Enable"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=908} ```json {filename="config/tweaks.json",linenos=inline,linenostart=917}
"WPFTweaksEndTaskOnTaskbar": { "WPFTweaksEndTaskOnTaskbar": {
"Content": "End Task With Right Click - Enable", "Content": "End Task With Right Click - Enable",
"Description": "Enables option to end task when right clicking a program in the taskbar.", "Description": "Enables option to end task when right clicking a program in the taskbar.",
@@ -3,7 +3,7 @@ title: "Location Tracking - Disable"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=128} ```json {filename="config/tweaks.json",linenos=inline,linenostart=130}
"WPFTweaksLocation": { "WPFTweaksLocation": {
"Content": "Location Tracking - Disable", "Content": "Location Tracking - Disable",
"Description": "Disables Location Tracking.", "Description": "Disables Location Tracking.",
@@ -3,7 +3,7 @@ title: "Restore Point - Create"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=881} ```json {filename="config/tweaks.json",linenos=inline,linenostart=890}
"WPFTweaksRestorePoint": { "WPFTweaksRestorePoint": {
"Content": "Restore Point - Create", "Content": "Restore Point - Create",
"Description": "Creates a restore point at runtime in case a revert is needed from WinUtil modifications.", "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: "" 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: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=165} ```json {filename="config/tweaks.json",linenos=inline,linenostart=167}
"WPFTweaksServices": { "WPFTweaksServices": {
"Content": "Services - Set to Manual", "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.", "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: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=465} ```json {filename="config/tweaks.json",linenos=inline,linenostart=467}
"WPFTweaksTelemetry": { "WPFTweaksTelemetry": {
"Content": "Telemetry - Disable", "Content": "Telemetry - Disable",
"Description": "Disables Microsoft Telemetry.", "Description": "Disables Microsoft Telemetry.",
@@ -3,7 +3,7 @@ title: "Windows Platform Binary Table (WPBT) - Disable"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=980} ```json {filename="config/tweaks.json",linenos=inline,linenostart=989}
"WPFTweaksWPBT": { "WPFTweaksWPBT": {
"Content": "Windows Platform Binary Table (WPBT) - Disable", "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.", "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: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1060} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1069}
"WPFTweaksBlockAdobeNet": { "WPFTweaksBlockAdobeNet": {
"Content": "Adobe URL Block List - Enable", "Content": "Adobe URL Block List - Enable",
"Description": "Reduces user interruptions by selectively blocking connections to Adobe's activation and telemetry servers. Credit: Ruddernation-Designs", "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: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=205} ```json {filename="config/tweaks.json",linenos=inline,linenostart=207}
"WPFTweaksBraveDebloat": { "WPFTweaksBraveDebloat": {
"Content": "Brave Browser - Debloat", "Content": "Brave Browser - Debloat",
"Description": "Disables various annoyances like Brave Rewards, Leo AI, Crypto Wallet and VPN.", "Description": "Disables various annoyances like Brave Rewards, Leo AI, Crypto Wallet and VPN.",
@@ -3,7 +3,7 @@ title: "Background Apps - Disable"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1194} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1212}
"WPFTweaksDisableBGapps": { "WPFTweaksDisableBGapps": {
"Content": "Background Apps - Disable", "Content": "Background Apps - Disable",
"Description": "Disables all Microsoft Store apps from running in the background, which has to be done individually since Windows 11.", "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: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1210} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1228}
"WPFTweaksDisableFSO": { "WPFTweaksDisableFSO": {
"Content": "Fullscreen Optimizations - Disable", "Content": "Fullscreen Optimizations - Disable",
"Description": "Disables FSO in all applications. NOTE: This will disable Color Management in Exclusive Fullscreen.", "Description": "Disables FSO in all applications. NOTE: This will disable Color Management in Exclusive Fullscreen.",
@@ -3,7 +3,7 @@ title: "IPv6 - Disable"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1172} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1190}
"WPFTweaksDisableIPv6": { "WPFTweaksDisableIPv6": {
"Content": "IPv6 - Disable", "Content": "IPv6 - Disable",
"Description": "Disables IPv6.", "Description": "Disables IPv6.",
@@ -3,7 +3,7 @@ title: "System Tray Notifications & Calendar - Disable"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1037} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1046}
"WPFTweaksDisableNotifications": { "WPFTweaksDisableNotifications": {
"Content": "System Tray Notifications & Calendar - Disable", "Content": "System Tray Notifications & Calendar - Disable",
"Description": "Disables all Notifications INCLUDING Calendar.", "Description": "Disables all Notifications INCLUDING Calendar.",
@@ -3,7 +3,7 @@ title: "RDP Unsigned File Warnings - Disable"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=298} ```json {filename="config/tweaks.json",linenos=inline,linenostart=300}
"WPFTweaksDisableWarningForUnsignedRdp": { "WPFTweaksDisableWarningForUnsignedRdp": {
"Content": "RDP Unsigned File Warnings - Disable", "Content": "RDP Unsigned File Warnings - Disable",
"Description": "Disables warnings shown when launching unsigned RDP files introduced with the latest Windows 10 and 11 updates.", "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: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=718} ```json {filename="config/tweaks.json",linenos=inline,linenostart=727}
"WPFTweaksDisplay": { "WPFTweaksDisplay": {
"Content": "Visual Effects - Set to Best Performance", "Content": "Visual Effects - Set to Best Performance",
"Description": "Sets the system preferences to performance. You can do this manually with sysdm.cpl as well.", "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: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=321} ```json {filename="config/tweaks.json",linenos=inline,linenostart=323}
"WPFTweaksEdgeDebloat": { "WPFTweaksEdgeDebloat": {
"Content": "Microsoft Edge - Debloat", "Content": "Microsoft Edge - Debloat",
"Description": "Disables various telemetry options, popups, and other annoyances in Edge.", "Description": "Disables various telemetry options, popups, and other annoyances in Edge.",
@@ -3,7 +3,7 @@ title: "IPv6 - Set IPv4 as Preferred"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1134} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1152}
"WPFTweaksIPv46": { "WPFTweaksIPv46": {
"Content": "IPv6 - Set IPv4 as Preferred", "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.", "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: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=996} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1005}
"WPFTweaksRazerBlock": { "WPFTweaksRazerBlock": {
"Content": "Razer Software Auto-Install - Disable", "Content": "Razer Software Auto-Install - Disable",
"Description": "Blocks ALL Razer Software installations. The hardware works fine without any software.", "Description": "Blocks ALL Razer Software installations. The hardware works fine without any software.",
@@ -3,7 +3,7 @@ title: "Microsoft Edge - Remove"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=606} ```json {filename="config/tweaks.json",linenos=inline,linenostart=608}
"WPFTweaksRemoveEdge": { "WPFTweaksRemoveEdge": {
"Content": "Microsoft Edge - Remove", "Content": "Microsoft Edge - Remove",
"Description": "Unblocks Microsoft Edge uninstaller restrictions then uses that uninstaller to remove Microsoft Edge.", "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: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=695} ```json {filename="config/tweaks.json",linenos=inline,linenostart=697}
"WPFTweaksRemoveHome": { "WPFTweaksRemoveHomeAndGallery": {
"Content": "File Explorer Home and Gallery - Disable", "Content": "File Explorer Home and Gallery - Disable",
"Description": "Removes the Home and Gallery from Explorer and sets This PC as default.", "Description": "Removes the Home and Gallery from Explorer and sets This PC as default.",
"category": "z__Advanced Tweaks - CAUTION", "category": "z__Advanced Tweaks - CAUTION",
@@ -17,6 +17,13 @@ description: ""
"Type": "DWord", "Type": "DWord",
"OriginalValue": "<RemoveEntry>" "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", "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
"Name": "LaunchTo", "Name": "LaunchTo",
@@ -3,7 +3,7 @@ title: "Microsoft OneDrive - Remove"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=651} ```json {filename="config/tweaks.json",linenos=inline,linenostart=653}
"WPFTweaksRemoveOneDrive": { "WPFTweaksRemoveOneDrive": {
"Content": "Microsoft OneDrive - Remove", "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.", "Description": "Denies permission to remove OneDrive user files, then uses its own uninstaller to remove it and restores the original permission afterward.",
@@ -3,12 +3,21 @@ title: "Right-Click Menu Previous Layout - Enable"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1086} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1095}
"WPFTweaksRightClickMenu": { "WPFTweaksRightClickMenu": {
"Content": "Right-Click Menu Previous Layout - Enable", "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.", "Description": "Restores the classic context menu when right-clicking in File Explorer, replacing the simplified Windows 11 version.",
"category": "z__Advanced Tweaks - CAUTION", "category": "z__Advanced Tweaks - CAUTION",
"panel": "1", "panel": "1",
"registry": [
{
"Path": "HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\\InprocServer32",
"Name": "(default)",
"Value": "",
"Type": "String",
"OriginalValue": "<RemoveEntry>"
}
],
"InvokeScript": [ "InvokeScript": [
" "
New-Item -Path \"HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\" -Name \"InprocServer32\" -force -value \"\" 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: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=924} ```json {filename="config/tweaks.json",linenos=inline,linenostart=933}
"WPFTweaksStorage": { "WPFTweaksStorage": {
"Content": "Storage Sense - Disable", "Content": "Storage Sense - Disable",
"Description": "Storage Sense deletes temp files automatically.", "Description": "Storage Sense deletes temp files automatically.",
@@ -3,7 +3,7 @@ title: "Teredo - Disable"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1150} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1168}
"WPFTweaksTeredo": { "WPFTweaksTeredo": {
"Content": "Teredo - Disable", "Content": "Teredo - Disable",
"Description": "Teredo network tunneling is an IPv6 feature that can cause additional latency, but may cause problems with some games.", "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: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=635} ```json {filename="config/tweaks.json",linenos=inline,linenostart=637}
"WPFTweaksUTC": { "WPFTweaksUTC": {
"Content": "Date & Time - Set Time to UTC", "Content": "Date & Time - Set Time to UTC",
"Description": "Essential for computers that are dual booting. Fixes the time sync with Linux systems.", "Description": "Essential for computers that are dual booting. Fixes the time sync with Linux systems.",
@@ -3,7 +3,7 @@ title: "Windows AI - Disable"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=940} ```json {filename="config/tweaks.json",linenos=inline,linenostart=949}
"WPFTweaksWindowsAI": { "WPFTweaksWindowsAI": {
"Content": "Windows AI - Disable", "Content": "Windows AI - Disable",
"Description": "Removes or disables all ai features and packages", "Description": "Removes or disables all ai features and packages",
@@ -3,7 +3,7 @@ title: "Xbox & Gaming Components - Remove"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=817} ```json {filename="config/tweaks.json",linenos=inline,linenostart=826}
"WPFTweaksXboxRemoval": { "WPFTweaksXboxRemoval": {
"Content": "Xbox & Gaming Components - Remove", "Content": "Xbox & Gaming Components - Remove",
"Description": "Removes Xbox services, the Xbox app, Game Bar, and related authentication components.", "Description": "Removes Xbox services, the Xbox app, Game Bar, and related authentication components.",
@@ -3,7 +3,7 @@ title: "DNS - Set to:"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1855} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1873}
"WPFchangedns": { "WPFchangedns": {
"Content": "DNS - Set to:", "Content": "DNS - Set to:",
"category": "z__Advanced Tweaks - CAUTION", "category": "z__Advanced Tweaks - CAUTION",
@@ -14,10 +14,6 @@ function Set-WinUtilProgressbar{
[int]$Percent [int]$Percent
) )
if($PARAM_NOUI) {
return;
}
Invoke-WPFUIThread -ScriptBlock {$sync.progressBarTextBlock.Text = $label} Invoke-WPFUIThread -ScriptBlock {$sync.progressBarTextBlock.Text = $label}
Invoke-WPFUIThread -ScriptBlock {$sync.progressBarTextBlock.ToolTip = $label} Invoke-WPFUIThread -ScriptBlock {$sync.progressBarTextBlock.ToolTip = $label}
if ($percent -lt 5 ) { if ($percent -lt 5 ) {
-11
View File
@@ -92,17 +92,6 @@ function Invoke-WPFImpex {
$sync.selectedFeatures = [System.Collections.Generic.List[string]]::new() $sync.selectedFeatures = [System.Collections.Generic.List[string]]::new()
Update-WinUtilSelections -flatJson $flattenedJson 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 { } catch {
Write-Error "An error occurred while importing: $_" Write-Error "An error occurred while importing: $_"
+1 -19
View File
@@ -1,21 +1,3 @@
function Invoke-WPFUIThread { function Invoke-WPFUIThread ($ScriptBlock) {
<#
.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;
}
$sync.form.Dispatcher.Invoke([action]$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 # Create a new session state for parsing variables into our runspace
$hashVars = New-object System.Management.Automation.Runspaces.SessionStateVariableEntry -ArgumentList 'sync',$sync,$Null $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 $offlineVar = New-object System.Management.Automation.Runspaces.SessionStateVariableEntry -ArgumentList 'PARAM_OFFLINE',$PARAM_OFFLINE,$Null
$InitialSessionState = [System.Management.Automation.Runspaces.InitialSessionState]::CreateDefault() $InitialSessionState = [System.Management.Automation.Runspaces.InitialSessionState]::CreateDefault()
# Add the variable to the session state # Add the variable to the session state
$InitialSessionState.Variables.Add($hashVars) $InitialSessionState.Variables.Add($hashVars)
$InitialSessionState.Variables.Add($uiVar)
$InitialSessionState.Variables.Add($offlineVar) $InitialSessionState.Variables.Add($offlineVar)
# Get every private function and add them to the session state # Get every private function and add them to the session state
@@ -91,8 +89,6 @@ $sync.configs.applications.PSObject.Properties | ForEach-Object {
Set-Preferences Set-Preferences
if ($Preset) { if ($Preset) {
Show-CTTLogo
# Selects the tweaks from $Preset varible # Selects the tweaks from $Preset varible
Update-WinUtilSelections -flatJson $sync.configs.preset.$Preset Update-WinUtilSelections -flatJson $sync.configs.preset.$Preset
@@ -107,27 +103,17 @@ if ($Preset) {
return return
} }
if ($PARAM_NOUI) { if ($Config) {
Show-CTTLogo Invoke-WPFImpex -type "import" -Config $Config
if ($PARAM_CONFIG -and -not [string]::IsNullOrWhiteSpace($PARAM_CONFIG)) {
Write-Host "Running config file tasks..."
Invoke-WPFImpex -type "import" -Config $PARAM_CONFIG
Invoke-WinUtilAutoRun
$sync.runspace.Dispose() Invoke-WinUtilAutoRun
$sync.runspace.Close()
[System.GC]::Collect() # Cleanup and exit
Stop-Transcript $sync.runspace.Dispose()
exit 1 $sync.runspace.Close()
} [System.GC]::Collect()
else { Stop-Transcript
Write-Host "Cannot automatically run without a config file provided." return
$sync.runspace.Dispose()
$sync.runspace.Close()
[System.GC]::Collect()
Stop-Transcript
exit 1
}
} }
$inputXML = $inputXML -replace 'mc:Ignorable="d"', '' -replace "x:N", 'N' -replace '^<Win.*', '<Window' $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 Invoke-WPFTab "WPFTab1BT" # Default to install tab
} }
if (-not $PARAM_CONFIG -and (Test-Path "$winutildir\lastrun.json")) { if (-not $Config -and (Test-Path "$winutildir\lastrun.json")) {
try { $drifted = @(Get-Content "$winutildir\lastrun.json" | ConvertFrom-Json | Where-Object { $_ -notin (Invoke-WinUtilCurrentSystem -CheckBox "tweaks") })
$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") {
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
Update-WinUtilSelections -flatJson $drifted Reset-WPFCheckBoxes -doToggles $false
Reset-WPFCheckBoxes -doToggles $false Invoke-WPFTab "WPFTab2BT"
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
} }
} }
$sync["Form"].Focus()
}) })
# The SearchBarTimer is used to delay the search operation until the user has stopped typing for a short period # The SearchBarTimer is used to delay the search operation until the user has stopped typing for a short period
-10
View File
@@ -10,19 +10,9 @@ param (
[string]$Config, [string]$Config,
[ValidateSet("Standard", "Minimal", "Advanced", "")] [ValidateSet("Standard", "Minimal", "Advanced", "")]
[string]$Preset, [string]$Preset,
[switch]$Noui,
[switch]$Offline [switch]$Offline
) )
if ($Config) {
$PARAM_CONFIG = $Config
}
$PARAM_NOUI = $false
if ($Noui) {
$PARAM_NOUI = $true
}
$PARAM_OFFLINE = $false $PARAM_OFFLINE = $false
if ($Offline) { if ($Offline) {
$PARAM_OFFLINE = $true $PARAM_OFFLINE = $true