From 800a5085fca5cdfad17c0310b330f277106a1f62 Mon Sep 17 00:00:00 2001 From: Andrew <121936658+7gxycn08@users.noreply.github.com> Date: Sun, 12 May 2024 00:45:32 +0400 Subject: [PATCH 01/14] Added ForceAutoHDR application to applications.json (#1951) * Added ForceAutoHDR application to applications.json Entry added on line 2642 * Update config/applications.json Yep my bad I though games related tools should be under "Games" Co-authored-by: Mr.k --------- Co-authored-by: Mr.k --- config/applications.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/applications.json b/config/applications.json index 4cfd0904..989839e9 100644 --- a/config/applications.json +++ b/config/applications.json @@ -2694,5 +2694,13 @@ "description": "The customization marketplace for Windows programs", "link": "https://windhawk.net", "winget": "RamenSoftware.Windhawk" + }, + "WPFInstallForceAutoHDR": { + "category": "Utilities", + "choco": "na", + "content": "GUI That Forces Auto HDR In Unsupported Games", + "description": "ForceAutoHDR simplifies the process of adding games to the AutoHDR list in the Windows Registry", + "link": "https://github.com/7gxycn08/ForceAutoHDR", + "winget": "ForceAutoHDR.7gxycn08" } } From c78a48d67025c8e68adee12e4fa958cccbf7972c Mon Sep 17 00:00:00 2001 From: ChrisTitusTech Date: Sat, 11 May 2024 20:45:57 +0000 Subject: [PATCH 02/14] Compile Winutil --- winutil.ps1 | 21 ++++++++++++++++----- xaml/inputApp.xaml | 9 ++++++--- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/winutil.ps1 b/winutil.ps1 index aee1eeea..e5ce7fcf 100644 --- a/winutil.ps1 +++ b/winutil.ps1 @@ -10,7 +10,7 @@ Author : Chris Titus @christitustech Runspace Author: @DeveloperDurp GitHub : https://github.com/ChrisTitusTech - Version : 24.05.10 + Version : 24.05.11 #> param ( [switch]$Debug, @@ -47,7 +47,7 @@ Add-Type -AssemblyName System.Windows.Forms # Variable to sync between runspaces $sync = [Hashtable]::Synchronized(@{}) $sync.PSScriptRoot = $PSScriptRoot -$sync.version = "24.05.10" +$sync.version = "24.05.11" $sync.configs = @{} $sync.ProcessRunning = $false @@ -7738,6 +7738,14 @@ $sync.configs.applications = '{ "description": "The customization marketplace for Windows programs", "link": "https://windhawk.net", "winget": "RamenSoftware.Windhawk" + }, + "WPFInstallForceAutoHDR": { + "category": "Utilities", + "choco": "na", + "content": "GUI That Forces Auto HDR In Unsupported Games", + "description": "ForceAutoHDR simplifies the process of adding games to the AutoHDR list in the Windows Registry", + "link": "https://github.com/7gxycn08/ForceAutoHDR", + "winget": "ForceAutoHDR.7gxycn08" } }' | convertfrom-json $sync.configs.dns = '{ @@ -12919,6 +12927,9 @@ $inputXML = ' + + + @@ -12960,15 +12971,15 @@ $inputXML = ' - - - + + + diff --git a/xaml/inputApp.xaml b/xaml/inputApp.xaml index 3c19da16..d8953256 100644 --- a/xaml/inputApp.xaml +++ b/xaml/inputApp.xaml @@ -797,6 +797,9 @@ + + + @@ -838,15 +841,15 @@ - - - + + + From 4993407f2c155e93622cf61c4065a8fc3b06c2fe Mon Sep 17 00:00:00 2001 From: Jelle <89023848+mrjbongo@users.noreply.github.com> Date: Sat, 11 May 2024 22:46:08 +0200 Subject: [PATCH 03/14] add Godot Engine to applications.json (#1933) Added Godot Engine (https://godotengine.org/). Godot Engine is a free, open-source 2D and 3D game engine with a focus on usability and flexibility. --- config/applications.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/applications.json b/config/applications.json index 989839e9..f7a57d53 100644 --- a/config/applications.json +++ b/config/applications.json @@ -743,6 +743,14 @@ "link": "https://www.glarysoft.com/glary-utilities/", "winget": "Glarysoft.GlaryUtilities" }, + "WPFInstallgodotengine": { + "category": "Development", + "choco": "godot", + "content": "Godot Engine", + "description": "Godot Engine is a free, open-source 2D and 3D game engine with a focus on usability and flexibility.", + "link": "https://godotengine.org/", + "winget": "GodotEngine.GodotEngine" + }, "WPFInstallgog": { "category": "Games", "choco": "goggalaxy", From a0db6cfdce73ec8c09cfded1a0977a41a9cec606 Mon Sep 17 00:00:00 2001 From: ChrisTitusTech Date: Sat, 11 May 2024 20:46:32 +0000 Subject: [PATCH 04/14] Compile Winutil --- winutil.ps1 | 35 +++++++++++++++++++++++------------ xaml/inputApp.xaml | 27 +++++++++++++++------------ 2 files changed, 38 insertions(+), 24 deletions(-) diff --git a/winutil.ps1 b/winutil.ps1 index e5ce7fcf..b82e0923 100644 --- a/winutil.ps1 +++ b/winutil.ps1 @@ -5787,6 +5787,14 @@ $sync.configs.applications = '{ "link": "https://www.glarysoft.com/glary-utilities/", "winget": "Glarysoft.GlaryUtilities" }, + "WPFInstallgodotengine": { + "category": "Development", + "choco": "godot", + "content": "Godot Engine", + "description": "Godot Engine is a free, open-source 2D and 3D game engine with a focus on usability and flexibility.", + "link": "https://godotengine.org/", + "winget": "GodotEngine.GodotEngine" + }, "WPFInstallgog": { "category": "Games", "choco": "goggalaxy", @@ -12288,6 +12296,9 @@ $inputXML = ' + + + @@ -12338,15 +12349,15 @@ $inputXML = ' - - - + + + @@ -12544,15 +12555,15 @@ $inputXML = ' + + + @@ -12758,15 +12769,15 @@ $inputXML = ' + + + @@ -12968,15 +12979,15 @@ $inputXML = ' - - - + + + diff --git a/xaml/inputApp.xaml b/xaml/inputApp.xaml index d8953256..23531409 100644 --- a/xaml/inputApp.xaml +++ b/xaml/inputApp.xaml @@ -158,6 +158,9 @@ + + + @@ -208,15 +211,15 @@ - - - + + + @@ -414,15 +417,15 @@ + + + @@ -628,15 +631,15 @@ + + + @@ -838,15 +841,15 @@ - - - + + + From d893c0512a7dad134ab6dc51cd0be3272aa45c45 Mon Sep 17 00:00:00 2001 From: Marc Brooks Date: Sat, 11 May 2024 15:46:37 -0500 Subject: [PATCH 05/14] Add GitKraken Client (#1927) Adds development utility client for git repository management --- config/applications.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/applications.json b/config/applications.json index f7a57d53..b568a0d9 100644 --- a/config/applications.json +++ b/config/applications.json @@ -735,6 +735,14 @@ "link": "https://desktop.github.com/", "winget": "Git.Git;GitHub.GitHubDesktop" }, + "WPFInstallgitkrakenclient": { + "category": "Development", + "choco": "gitkraken", + "content": "GitKraken Client", + "description": "GitKraken Client is a powerful visual Git client from Axosoft that works with ALL git repositories on any hosting environment.", + "link": "https://www.gitkraken.com/git-client", + "winget": "Axosoft.GitKraken" + }, "WPFInstallglaryutilities": { "category": "Utilities", "choco": "glaryutilities-free", From 794d390a7faba18ac282a3d0a0971171180c9053 Mon Sep 17 00:00:00 2001 From: ChrisTitusTech Date: Sat, 11 May 2024 20:47:02 +0000 Subject: [PATCH 06/14] Compile Winutil --- winutil.ps1 | 27 +++++++++++++++++++-------- xaml/inputApp.xaml | 19 +++++++++++-------- 2 files changed, 30 insertions(+), 16 deletions(-) diff --git a/winutil.ps1 b/winutil.ps1 index b82e0923..e254c343 100644 --- a/winutil.ps1 +++ b/winutil.ps1 @@ -5779,6 +5779,14 @@ $sync.configs.applications = '{ "link": "https://desktop.github.com/", "winget": "Git.Git;GitHub.GitHubDesktop" }, + "WPFInstallgitkrakenclient": { + "category": "Development", + "choco": "gitkraken", + "content": "GitKraken Client", + "description": "GitKraken Client is a powerful visual Git client from Axosoft that works with ALL git repositories on any hosting environment.", + "link": "https://www.gitkraken.com/git-client", + "winget": "Axosoft.GitKraken" + }, "WPFInstallglaryutilities": { "category": "Utilities", "choco": "glaryutilities-free", @@ -12296,6 +12304,9 @@ $inputXML = ' + + + @@ -12346,15 +12357,15 @@ $inputXML = ' - - - + + + @@ -12554,12 +12565,12 @@ $inputXML = ' - + - + - - - + + + diff --git a/xaml/inputApp.xaml b/xaml/inputApp.xaml index 23531409..229031f5 100644 --- a/xaml/inputApp.xaml +++ b/xaml/inputApp.xaml @@ -158,6 +158,9 @@ + + + @@ -208,15 +211,15 @@ - - - + + + @@ -416,12 +419,12 @@ - + + + + + From eec184ee81c5e4140c9a58db1595f9bb8f2ff187 Mon Sep 17 00:00:00 2001 From: Hayden Plumley Date: Sat, 11 May 2024 13:48:18 -0700 Subject: [PATCH 07/14] Simplified Admin Check and Added Code Comments (#1938) - Simplified the admin check by filtering the "WindowsIdentity" class for owner value and comparing against admin value - Removed the need for an if admin check by moving its commands under the if not admin check. - Added code comments --- scripts/start.ps1 | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/scripts/start.ps1 b/scripts/start.ps1 index a2b65b01..4f68920a 100644 --- a/scripts/start.ps1 +++ b/scripts/start.ps1 @@ -44,21 +44,16 @@ $sync.version = "#{replaceme}" $sync.configs = @{} $sync.ProcessRunning = $false -$currentPid = [System.Security.Principal.WindowsIdentity]::GetCurrent() -$principal = new-object System.Security.Principal.WindowsPrincipal($currentPid) -$adminRole=[System.Security.Principal.WindowsBuiltInRole]::Administrator - - -if ($principal.IsInRole($adminRole)) -{ - $Host.UI.RawUI.WindowTitle = $myInvocation.MyCommand.Definition + "(Admin)" - clear-host -} -else +# If script isn't running as admin, show error message and quit +If (([Security.Principal.WindowsIdentity]::GetCurrent()).Owner.Value -ne "S-1-5-32-544") { Write-Host "===========================================" -Foregroundcolor Red Write-Host "-- Scripts must be run as Administrator ---" -Foregroundcolor Red Write-Host "-- Right-Click Start -> Terminal(Admin) ---" -Foregroundcolor Red Write-Host "===========================================" -Foregroundcolor Red break -} \ No newline at end of file +} + +# Set PowerShell window title +$Host.UI.RawUI.WindowTitle = $myInvocation.MyCommand.Definition + "(Admin)" +clear-host From 15eb12af1163f674205c5ec706e2449a4589158f Mon Sep 17 00:00:00 2001 From: ChrisTitusTech Date: Sat, 11 May 2024 20:48:42 +0000 Subject: [PATCH 08/14] Compile Winutil --- winutil.ps1 | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/winutil.ps1 b/winutil.ps1 index e254c343..13daae3e 100644 --- a/winutil.ps1 +++ b/winutil.ps1 @@ -51,17 +51,8 @@ $sync.version = "24.05.11" $sync.configs = @{} $sync.ProcessRunning = $false -$currentPid = [System.Security.Principal.WindowsIdentity]::GetCurrent() -$principal = new-object System.Security.Principal.WindowsPrincipal($currentPid) -$adminRole=[System.Security.Principal.WindowsBuiltInRole]::Administrator - - -if ($principal.IsInRole($adminRole)) -{ - $Host.UI.RawUI.WindowTitle = $myInvocation.MyCommand.Definition + "(Admin)" - clear-host -} -else +# If script isn't running as admin, show error message and quit +If (([Security.Principal.WindowsIdentity]::GetCurrent()).Owner.Value -ne "S-1-5-32-544") { Write-Host "===========================================" -Foregroundcolor Red Write-Host "-- Scripts must be run as Administrator ---" -Foregroundcolor Red @@ -69,6 +60,10 @@ else Write-Host "===========================================" -Foregroundcolor Red break } + +# Set PowerShell window title +$Host.UI.RawUI.WindowTitle = $myInvocation.MyCommand.Definition + "(Admin)" +clear-host function ConvertTo-Icon { <# From f130fc6c495e87e6559f4b1b3dbb5c61139a2c56 Mon Sep 17 00:00:00 2001 From: Berrick Werkman <105836264+BKlaasWerkman@users.noreply.github.com> Date: Sat, 11 May 2024 15:52:52 -0500 Subject: [PATCH 09/14] Main window handle (#1941) Condition is comparing $proc.Id with [System.IntPtr]::Zero. The Id property is an integer, representing the process ID, and it's not directly related to window handles. Instead, you should compare the MainWindowHandle property against [System.IntPtr]::Zero --- scripts/main.ps1 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index cc9aaa35..5507d641 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -271,10 +271,14 @@ Add-Type @" "@ } - foreach ($proc in (Get-Process | Where-Object { $_.MainWindowTitle -and $_.MainWindowTitle -like "*titus*" })) { - if ($proc.Id -ne [System.IntPtr]::Zero) { + foreach ($proc in (Get-Process | Where-Object { $_.MainWindowTitle -and $_.MainWindowTitle -like "*titus*" })) { + # Check if the process's MainWindowHandle is valid + if ($proc.MainWindowHandle -ne [System.IntPtr]::Zero) { Write-Debug "MainWindowHandle: $($proc.Id) $($proc.MainWindowTitle) $($proc.MainWindowHandle)" $windowHandle = $proc.MainWindowHandle + } else { + Write-Warning "Process found, but no MainWindowHandle: $($proc.Id) $($proc.MainWindowTitle)" + } } From 3c2b236d0a21186bcff3bc69550b12d8d87c8ee5 Mon Sep 17 00:00:00 2001 From: ChrisTitusTech Date: Sat, 11 May 2024 20:53:18 +0000 Subject: [PATCH 10/14] Compile Winutil --- winutil.ps1 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/winutil.ps1 b/winutil.ps1 index 13daae3e..66f21eb2 100644 --- a/winutil.ps1 +++ b/winutil.ps1 @@ -13864,10 +13864,14 @@ Add-Type @" "@ } - foreach ($proc in (Get-Process | Where-Object { $_.MainWindowTitle -and $_.MainWindowTitle -like "*titus*" })) { - if ($proc.Id -ne [System.IntPtr]::Zero) { + foreach ($proc in (Get-Process | Where-Object { $_.MainWindowTitle -and $_.MainWindowTitle -like "*titus*" })) { + # Check if the process's MainWindowHandle is valid + if ($proc.MainWindowHandle -ne [System.IntPtr]::Zero) { Write-Debug "MainWindowHandle: $($proc.Id) $($proc.MainWindowTitle) $($proc.MainWindowHandle)" $windowHandle = $proc.MainWindowHandle + } else { + Write-Warning "Process found, but no MainWindowHandle: $($proc.Id) $($proc.MainWindowTitle)" + } } From 9850ffd2c2b3f0ddb3a649a6e8d6144d7ae24c94 Mon Sep 17 00:00:00 2001 From: o-iu <168581616+o-iu@users.noreply.github.com> Date: Sat, 11 May 2024 17:54:18 -0300 Subject: [PATCH 11/14] Add SMPlayer to `applications.json` (#1948) * Add SMPlayer to `applications.json` * Fix formatting --------- Co-authored-by: Chris Titus --- config/applications.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/applications.json b/config/applications.json index b568a0d9..9f69473b 100644 --- a/config/applications.json +++ b/config/applications.json @@ -2679,6 +2679,14 @@ "link": "https://github.com/magic-wormhole/magic-wormhole", "winget": "magic-wormhole.magic-wormhole" }, + "WPFInstallsmplayer": { + "category": "Multimedia Tools", + "choco": "smplayer", + "content": "SMPlayer", + "description": "SMPlayer is a free media player for Windows and Linux with built-in codecs that can play virtually all video and audio formats.", + "link": "https://www.smplayer.info", + "winget": "SMPlayer.SMPlayer" + }, "WPFInstalglazewm": { "category": "Utilities", "choco": "na", From 2c5544c4c7aea43a79a7848ce74f26604d7010e2 Mon Sep 17 00:00:00 2001 From: ChrisTitusTech Date: Sat, 11 May 2024 20:54:40 +0000 Subject: [PATCH 12/14] Compile Winutil --- winutil.ps1 | 23 +++++++++++++++++------ xaml/inputApp.xaml | 15 +++++++++------ 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/winutil.ps1 b/winutil.ps1 index 66f21eb2..7c002b2f 100644 --- a/winutil.ps1 +++ b/winutil.ps1 @@ -7718,6 +7718,14 @@ $sync.configs.applications = '{ "link": "https://github.com/magic-wormhole/magic-wormhole", "winget": "magic-wormhole.magic-wormhole" }, + "WPFInstallsmplayer": { + "category": "Multimedia Tools", + "choco": "smplayer", + "content": "SMPlayer", + "description": "SMPlayer is a free media player for Windows and Linux with built-in codecs that can play virtually all video and audio formats.", + "link": "https://www.smplayer.info", + "winget": "SMPlayer.SMPlayer" + }, "WPFInstalglazewm": { "category": "Utilities", "choco": "na", @@ -12751,6 +12759,9 @@ $inputXML = ' + + + @@ -12771,14 +12782,14 @@ $inputXML = ' - - - + + + + + + diff --git a/xaml/inputApp.xaml b/xaml/inputApp.xaml index 229031f5..8046162c 100644 --- a/xaml/inputApp.xaml +++ b/xaml/inputApp.xaml @@ -610,6 +610,9 @@ + + + @@ -630,14 +633,14 @@ - - - + + + + + + From dd705267318505b002a860c566a57f44707f6a9d Mon Sep 17 00:00:00 2001 From: MyDrift Date: Sat, 11 May 2024 23:01:48 +0200 Subject: [PATCH 13/14] Adobe Network Blocking / Adobe Debloater / Tweak Fixes & more (#1954) * Added Applications AFFiNE: Open source Notion alternative with selfhostable option for syncing. Wazuh Agent: Adgent for open-source security monitoring platform * Change layout of toggles Change the layout of the toggles to first show toggles and then the content (text). - testet, works * added snap related toggles - disable snapping entirely (requires relogin of windows user) - disable suggestion to snap other windows next to the snapped window -tested * Layouted Checkboxes, redesigned Toggles & renamed RDCMan - Removed text inside toggle as it can be confusing because it sais "enable" while enabled and "disable" if disabled. The coloring should be enough to know in what state that setting is. - without the text i could make it a little bit smaller while still letting it look good. - Renamed "Remote Desktop Connection Manager (RDCMan)" to "RDCMan" because that name is shorter and also mostly used by the linked site. - layouted checkboxes so they are not more left than the title and look tidy. - tested * Disable Acrobat auto-updates - added script & undoscript to disable automatic downloads & installation of acrobat reader. The user gets a notified if there is an update available. I put some info to that inside the code * edited AFFiNE description * Tweak Adobe Debloater -disable Adobe Desktop Service by getting ownership and renaming it. - added AGMService service - disable AGMService and AGSService entirely * Block Adobe Network, Debloat Adobe & Compile - fixes order of tweaks to always run "WPFTweaksRestorePoint" first. Before it was only the case because if was one of the first letter0s of the alphabet - Fixed some stuff at Debloat Adobe & added Adobe Reader update stopper & "deactivated" Adobe Desktop Service. - Added Blocking of Adobe Servers (as of your suggestion) to it's own Tweak. - ran compile for testing & showing * undo compilation * added Note to AcrobatUpdates Management in Tweak "Debloat Adobe" * Fix Right Click Method to use accurate names * fixed my mistake in README --------- Co-authored-by: Chris Titus --- README.md | 2 +- config/applications.json | 18 +- config/tweaks.json | 245 +++++++++++++++++- functions/private/Get-TabXaml.ps1 | 5 +- functions/private/Get-WinUtilCheckBoxes.ps1 | 22 +- functions/private/Get-WinUtilToggleStatus.ps1 | 18 ++ .../private/Invoke-WinUtilSnapSuggestion.ps1 | 34 +++ .../private/Invoke-WinUtilSnapWindow.ps1 | 31 +++ functions/public/Invoke-WPFToggle.ps1 | 2 + winutil.ps1 | 17 +- xaml/inputApp.xaml | 14 +- xaml/inputXML.xaml | 36 +-- 12 files changed, 386 insertions(+), 58 deletions(-) create mode 100644 functions/private/Invoke-WinUtilSnapSuggestion.ps1 create mode 100644 functions/private/Invoke-WinUtilSnapWindow.ps1 diff --git a/README.md b/README.md index 60c4fec2..a921ad79 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Winutil must be run in Admin mode because it performs system-wide tweaks. To ach 1. **Right-Click Method:** - Right-click on the start menu. - - Choose "PowerShell As Admin" (for Windows 10) or "Windows Terminal As Admin" (for Windows 11). + - Choose "Windows PowerShell (Admin)" (for Windows 10) or "Terminal (Admin)" (for Windows 11). 2. **Search and Launch Method:** - Press the Windows key. diff --git a/config/applications.json b/config/applications.json index 9f69473b..be6d9a7a 100644 --- a/config/applications.json +++ b/config/applications.json @@ -31,6 +31,14 @@ "link": "https://www.advanced-ip-scanner.com/", "winget": "Famatech.AdvancedIPScanner" }, + "WPFInstallaffine": { + "category": "Document", + "choco": "na", + "content": "AFFiNE", + "description": "AFFiNE is an open source alternative to Notion. Write, draw, plan all at once. Selfhost it to sync across devices.", + "link": "https://affine.pro/", + "winget": "AFFiNE.stable" + }, "WPFInstallaimp": { "category": "Multimedia Tools", "choco": "aimp", @@ -106,7 +114,7 @@ "WPFInstallrdcman": { "category": "Microsoft Tools", "choco": "rdcman", - "content": "Remote Desktop Connection Manager (RDCMan)", + "content": "RDCMan", "description": "RDCMan manages multiple remote desktop connections. It is useful for managing server labs where you need regular access to each machine such as automated checkin systems and data centers.", "link": "https://learn.microsoft.com/en-us/sysinternals/downloads/rdcman", "winget": "Microsoft.Sysinternals.RDCMan" @@ -2367,6 +2375,14 @@ "link": "https://www.waterfox.net/", "winget": "Waterfox.Waterfox" }, + "WPFInstallwazuh": { + "category": "Utilities", + "choco": "wazuh-agent", + "content": "Wazuh.", + "description": "Wazuh is an open-source security monitoring platform that offers intrusion detection, compliance checks, and log analysis.", + "link": "https://wazuh.com/", + "winget": "Wazuh.WazuhAgent" + }, "WPFInstallwezterm": { "category": "Development", "choco": "wezterm", diff --git a/config/tweaks.json b/config/tweaks.json index e260bd3e..2b45b9b5 100644 --- a/config/tweaks.json +++ b/config/tweaks.json @@ -34,7 +34,7 @@ "Description": "Hibernation is really meant for laptops as it saves what's in memory before turning the pc off. It really should never be used, but some people are lazy and rely on it. Don't be like Bob. Bob likes hibernation.", "category": "Essential Tweaks", "panel": "1", - "Order": "a011_", + "Order": "a012_", "registry": [ { "Path": "HKLM:\\System\\CurrentControlSet\\Control\\Session Manager\\Power", @@ -63,7 +63,7 @@ "Description": "Disables HomeGroup - HomeGroup is a password-protected home networking service that lets you share your stuff with other PCs that are currently running and connected to your network.", "category": "Essential Tweaks", "panel": "1", - "Order": "a009_", + "Order": "a011_", "service": [ { "Name": "HomeGroupListener", @@ -77,16 +77,110 @@ } ] }, - "WPFTweaksAdobe": { - "Content": "Disable Adobe Services", - "Description": "Disables many of the services that come with Adobe and run in the background.", + "WPFTweaksDebloatAdobe": { + "Content": "Debloat Adobe", + "Description": "Manages Adobe Services, Adobe Desktop Service, and Acrobat Updates", "category": "Essential Tweaks", "panel": "1", - "Order": "a009_", + "Order": "a009_", + "InvokeScript": [ + " + function CCStopper { + $path = \"C:\\Program Files (x86)\\Common Files\\Adobe\\Adobe Desktop Common\\ADS\\Adobe Desktop Service.exe\" + + # Test if the path exists before proceeding + if (Test-Path $path) { + Takeown /f $path + $acl = Get-Acl $path + $acl.SetOwner([System.Security.Principal.NTAccount]\"Administrators\") + $acl | Set-Acl $path + + Rename-Item -Path $path -NewName \"Adobe Desktop Service.exe.old\" -Force + } else { + Write-Host \"Adobe Desktop Service is not in the default location.\" + } + } + + + function AcrobatUpdates { + # Editing Acrobat Updates. The last folder before the key is dynamic, therefore using a script. + # Possible Values for the edited key: + # 0 = Do not download or install updates automatically + # 2 = Automatically download updates but let the user choose when to install them + # 3 = Automatically download and install updates (default value) + # 4 = Notify the user when an update is available but don't download or install it automatically + # = It notifies the user using Windows Notifications. It runs on startup without having to have a Service/Acrobat/Reader running, therefore 0 is the next best thing. + + $rootPath = \"HKLM:\\SOFTWARE\\WOW6432Node\\Adobe\\Adobe ARM\\Legacy\\Acrobat\" + + # Get all subkeys under the specified root path + $subKeys = Get-ChildItem -Path $rootPath | Where-Object { $_.PSChildName -like \"{*}\" } + + # Loop through each subkey + foreach ($subKey in $subKeys) { + # Get the full registry path + $fullPath = Join-Path -Path $rootPath -ChildPath $subKey.PSChildName + try { + Set-ItemProperty -Path $fullPath -Name Mode -Value 0 + Write-Host \"Acrobat Updates have been disabled.\" + } catch { + Write-Host \"Registry Key for changing Acrobat Updates does not exist in $fullPath\" + } + } + } + + CCStopper + AcrobatUpdates + " + ], + "UndoScript": [ + " + function RestoreCCService { + $originalPath = \"C:\\Program Files (x86)\\Common Files\\Adobe\\Adobe Desktop Common\\ADS\\Adobe Desktop Service.exe.old\" + $newPath = \"C:\\Program Files (x86)\\Common Files\\Adobe\\Adobe Desktop Common\\ADS\\Adobe Desktop Service.exe\" + + if (Test-Path -Path $originalPath) { + Rename-Item -Path $originalPath -NewName \"Adobe Desktop Service.exe\" -Force + Write-Host \"Adobe Desktop Service has been restored.\" + } else { + Write-Host \"Backup file does not exist. No changes were made.\" + } + } + + function AcrobatUpdates { + # Default Value: + # 3 = Automatically download and install updates + + $rootPath = \"HKLM:\\SOFTWARE\\WOW6432Node\\Adobe\\Adobe ARM\\Legacy\\Acrobat\" + + # Get all subkeys under the specified root path + $subKeys = Get-ChildItem -Path $rootPath | Where-Object { $_.PSChildName -like \"{*}\" } + + # Loop through each subkey + foreach ($subKey in $subKeys) { + # Get the full registry path + $fullPath = Join-Path -Path $rootPath -ChildPath $subKey.PSChildName + try { + Set-ItemProperty -Path $fullPath -Name Mode -Value 3 + } catch { + Write-Host \"Registry Key for changing Acrobat Updates does not exist in $fullPath\" + } + } + } + + RestoreCCService + AcrobatUpdates + " + ], "service": [ { "Name": "AGSService", - "StartupType": "Manual", + "StartupType": "Disabled", + "OriginalType": "Automatic" + }, + { + "Name": "AGMService", + "StartupType": "Disabled", "OriginalType": "Automatic" }, { @@ -101,7 +195,7 @@ }, { "Name": "Adobe Genuine Monitor Service", - "StartupType": "Manual", + "StartupType": "Disabled", "OriginalType": "Automatic" }, { @@ -131,6 +225,119 @@ } ] }, + "WPFTweaksBlockAdobeNet": { + "Content": "Block Adobe Networking", + "Description": "Reduce user interruptions by selectively blocking connections to Adobe's activation and telemetry servers. ", + "category": "Essential Tweaks", + "panel": "1", + "Order": "a010_", + "InvokeScript": [ + " + # Define the URL of the remote HOSTS file and the local paths + $remoteHostsUrl = \"https://raw.githubusercontent.com/Ruddernation-Designs/Adobe-URL-Block-List/master/hosts\" + $localHostsPath = \"C:\\Windows\\System32\\drivers\\etc\\hosts\" + $tempHostsPath = \"C:\\Windows\\System32\\drivers\\etc\\temp_hosts\" + + # Download the remote HOSTS file to a temporary location + try { + Invoke-WebRequest -Uri $remoteHostsUrl -OutFile $tempHostsPath + Write-Output \"Downloaded the remote HOSTS file to a temporary location.\" + } + catch { + Write-Error \"Failed to download the HOSTS file. Error: $_\" + } + + # Check if the AdobeNetBlock has already been started + try { + $localHostsContent = Get-Content $localHostsPath -ErrorAction Stop + + # Check if AdobeNetBlock markers exist + $blockStartExists = $localHostsContent -like \"*#AdobeNetBlock-start*\" + if ($blockStartExists) { + Write-Output \"AdobeNetBlock-start already exists. Skipping addition of new block.\" + } else { + # Load the new block from the downloaded file + $newBlockContent = Get-Content $tempHostsPath -ErrorAction Stop + $newBlockContent = $newBlockContent | Where-Object { $_ -notmatch \"^\\s*#\" -and $_ -ne \"\" } # Exclude empty lines and comments + $newBlockHeader = \"#AdobeNetBlock-start\" + $newBlockFooter = \"#AdobeNetBlock-end\" + + # Combine the contents, ensuring new block is properly formatted + $combinedContent = $localHostsContent + $newBlockHeader, $newBlockContent, $newBlockFooter | Out-String + + # Write the combined content back to the original HOSTS file + $combinedContent | Set-Content $localHostsPath -Encoding ASCII + Write-Output \"Successfully added the AdobeNetBlock.\" + } + } + catch { + Write-Error \"Error during processing: $_\" + } + + # Clean up temporary file + Remove-Item $tempHostsPath -ErrorAction Ignore + + # Flush the DNS resolver cache + try { + Invoke-Expression \"ipconfig /flushdns\" + Write-Output \"DNS cache flushed successfully.\" + } + catch { + Write-Error \"Failed to flush DNS cache. Error: $_\" + } + " + ], + "UndoScript": [ + " + # Define the local path of the HOSTS file + $localHostsPath = \"C:\\Windows\\System32\\drivers\\etc\\hosts\" + + # Load the content of the HOSTS file + try { + $hostsContent = Get-Content $localHostsPath -ErrorAction Stop + } + catch { + Write-Error \"Failed to load the HOSTS file. Error: $_\" + return + } + + # Initialize flags and buffer for new content + $recording = $true + $newContent = @() + + # Iterate over each line of the HOSTS file + foreach ($line in $hostsContent) { + if ($line -match \"#AdobeNetBlock-start\") { + $recording = $false + } + if ($recording) { + $newContent += $line + } + if ($line -match \"#AdobeNetBlock-end\") { + $recording = $true + } + } + + # Write the filtered content back to the HOSTS file + try { + $newContent | Set-Content $localHostsPath -Encoding ASCII + Write-Output \"Successfully removed the AdobeNetBlock section from the HOSTS file.\" + } + catch { + Write-Error \"Failed to write back to the HOSTS file. Error: $_\" + } + + # Flush the DNS resolver cache + try { + Invoke-Expression \"ipconfig /flushdns\" + Write-Output \"DNS cache flushed successfully.\" + } + catch { + Write-Error \"Failed to flush DNS cache. Error: $_\" + } + " + ] + }, "WPFTweaksLoc": { "Content": "Disable Location Tracking", "Description": "Disables Location Tracking...DUH!", @@ -2687,12 +2894,28 @@ "Order": "a064_", "Type": "Toggle" }, + "WPFToggleSnapWindow": { + "Content": "Snap Window", + "Description": "If enabled you can align windows by dragging them. | Relogin Required", + "category": "Customize Preferences", + "panel": "2", + "Order": "a065_", + "Type": "Toggle" + }, "WPFToggleSnapFlyout": { "Content": "Snap Assist Flyout", "Description": "If enabled then Snap preview is disabled when maximize button is hovered.", "category": "Customize Preferences", "panel": "2", - "Order": "a065_", + "Order": "a066_", + "Type": "Toggle" + }, + "WPFToggleSnapSuggestion": { + "Content": "Snap Assist Suggestion", + "Description": "If enabled then you will get suggestions to snap other applications in the left over spaces.", + "category": "Customize Preferences", + "panel": "2", + "Order": "a067_", "Type": "Toggle" }, "WPFToggleMouseAcceleration": { @@ -2700,7 +2923,7 @@ "Description": "If Enabled then Cursor movement is affected by the speed of your physical mouse movements.", "category": "Customize Preferences", "panel": "2", - "Order": "a066_", + "Order": "a068_", "Type": "Toggle" }, "WPFToggleStickyKeys": { @@ -2708,7 +2931,7 @@ "Description": "If Enabled then Sticky Keys is activated - Sticky keys is an accessibility feature of some graphical user interfaces which assists users who have physical disabilities or help users reduce repetitive strain injury.", "category": "Customize Preferences", "panel": "2", - "Order": "a067_", + "Order": "a069_", "Type": "Toggle" }, "WPFOOSUbutton": { diff --git a/functions/private/Get-TabXaml.ps1 b/functions/private/Get-TabXaml.ps1 index a420e344..c4bccb9e 100644 --- a/functions/private/Get-TabXaml.ps1 +++ b/functions/private/Get-TabXaml.ps1 @@ -91,8 +91,9 @@ function Get-TabXaml { } $appInfo = $organizedData[$panel][$category][$appName] if ("Toggle" -eq $appInfo.Type) { - $blockXml += "`n`n" + $blockXml += "`n" + $blockXml += "`n" + $blockXml += "`n" } elseif ("Combobox" -eq $appInfo.Type) { $blockXml += "`n + + + - - - @@ -12790,6 +12790,11 @@ $inputXML = ' + + + + + - - - @@ -641,6 +641,11 @@ + + + + +