From 7f593e3b55bfe003ce45e4857e894a81caf08b5b Mon Sep 17 00:00:00 2001 From: Gabi <218829269+GabiNun2@users.noreply.github.com> Date: Fri, 29 May 2026 14:52:15 +0300 Subject: [PATCH 1/5] Update tweaks.json --- config/tweaks.json | 48 ++++++++++++++++++++-------------------------- 1 file changed, 21 insertions(+), 27 deletions(-) diff --git a/config/tweaks.json b/config/tweaks.json index 84b083969e..61be63b54f 100644 --- a/config/tweaks.json +++ b/config/tweaks.json @@ -147,6 +147,12 @@ "OriginalType": "Manual" } ], + "InvokeScript": [ + "Set-Service -Name lfsvc -StartupType Disabled" + ], + "UndoScript": [ + "Set-Service -Name lfsvc -StartupType Manual" + ], "registry": [ { "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\CapabilityAccessManager\\ConsentStore\\location", @@ -177,39 +183,27 @@ "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.", "category": "Essential Tweaks", "panel": "1", - "service": [ - { - "Name": "CscService", - "StartupType": "Disabled", - "OriginalType": "Manual" - }, - { - "Name": "DiagTrack", - "StartupType": "Disabled", - "OriginalType": "Automatic" - }, - { - "Name": "MapsBroker", - "StartupType": "Manual", - "OriginalType": "Automatic" - }, - { - "Name": "StorSvc", - "StartupType": "Manual", - "OriginalType": "Automatic" - }, - { - "Name": "SharedAccess", - "StartupType": "Disabled", - "OriginalType": "Automatic" - } - ], "InvokeScript": [ " + Set-Service -Name SharedAccess -StartupType Disabled + Set-Service -Name CscService -StartupType Disabled + Set-Service -Name DiagTrack -StartupType Disabled + Set-Service -Name MapsBroker -StartupType Manual + Set-Service -Name StorSvc -StartupType Manual + $Memory = (Get-CimInstance Win32_PhysicalMemory | Measure-Object Capacity -Sum).Sum / 1KB Set-ItemProperty -Path \"HKLM:\\SYSTEM\\CurrentControlSet\\Control\" -Name SvcHostSplitThresholdInKB -Value $Memory " ], + "UndoScript": [ + " + Set-Service -Name SharedAccess -StartupType Automatic + Set-Service -Name MapsBroker -StartupType Automatic + Set-Service -Name DiagTrack -StartupType Automatic + Set-Service -Name StorSvc -StartupType Automatic + Set-Service -Name CscService -StartupType Manual + " + ], "link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/services" }, "WPFTweaksBraveDebloat": { From d8937a141960ed77ff33db2ec0a5c42e71c98c35 Mon Sep 17 00:00:00 2001 From: Gabi <218829269+GabiNun2@users.noreply.github.com> Date: Fri, 29 May 2026 14:52:37 +0300 Subject: [PATCH 2/5] Delete functions/private/Set-WinUtilService.ps1 --- functions/private/Set-WinUtilService.ps1 | 40 ------------------------ 1 file changed, 40 deletions(-) delete mode 100644 functions/private/Set-WinUtilService.ps1 diff --git a/functions/private/Set-WinUtilService.ps1 b/functions/private/Set-WinUtilService.ps1 deleted file mode 100644 index 3ef8bd0630..0000000000 --- a/functions/private/Set-WinUtilService.ps1 +++ /dev/null @@ -1,40 +0,0 @@ -Function Set-WinUtilService { - <# - - .SYNOPSIS - Changes the startup type of the given service - - .PARAMETER Name - The name of the service to modify - - .PARAMETER StartupType - The startup type to set the service to - - .EXAMPLE - Set-WinUtilService -Name "HomeGroupListener" -StartupType "Manual" - - #> - param ( - $Name, - $StartupType - ) - try { - Write-Host "Setting Service $Name to $StartupType" - - # Check if the service exists - $service = Get-Service -Name $Name -ErrorAction Stop - - # Service exists, proceed with changing properties -- while handling auto delayed start for PWSH 5 - if (($PSVersionTable.PSVersion.Major -lt 7) -and ($StartupType -eq "AutomaticDelayedStart")) { - sc.exe config $Name start=delayed-auto - } else { - $service | Set-Service -StartupType $StartupType -ErrorAction Stop - } - } catch [System.ServiceProcess.ServiceNotFoundException] { - Write-Warning "Service $Name was not found." - } catch { - Write-Warning "Unable to set $Name due to unhandled exception." - Write-Warning $_.Exception.Message - } - -} From d8afbcc59f52fd98c5530412ee9cf915983af3bc Mon Sep 17 00:00:00 2001 From: Gabi <218829269+GabiNun2@users.noreply.github.com> Date: Fri, 29 May 2026 14:53:41 +0300 Subject: [PATCH 3/5] Update tweaks.json --- config/tweaks.json | 7 ------- 1 file changed, 7 deletions(-) diff --git a/config/tweaks.json b/config/tweaks.json index 61be63b54f..5cd2b91d7a 100644 --- a/config/tweaks.json +++ b/config/tweaks.json @@ -140,13 +140,6 @@ "Description": "Disables Location Tracking.", "category": "Essential Tweaks", "panel": "1", - "service": [ - { - "Name": "lfsvc", - "StartupType": "Disable", - "OriginalType": "Manual" - } - ], "InvokeScript": [ "Set-Service -Name lfsvc -StartupType Disabled" ], From 6304bdf21830066b158e3cdd079e2001b199d597 Mon Sep 17 00:00:00 2001 From: Gabi <218829269+GabiNun2@users.noreply.github.com> Date: Fri, 5 Jun 2026 07:22:57 +0300 Subject: [PATCH 4/5] Update Invoke-WinUtilCurrentSystem.ps1 --- .../private/Invoke-WinUtilCurrentSystem.ps1 | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/functions/private/Invoke-WinUtilCurrentSystem.ps1 b/functions/private/Invoke-WinUtilCurrentSystem.ps1 index 23fa7a1472..57d54a6b79 100644 --- a/functions/private/Invoke-WinUtilCurrentSystem.ps1 +++ b/functions/private/Invoke-WinUtilCurrentSystem.ps1 @@ -50,12 +50,11 @@ Function Invoke-WinUtilCurrentSystem { $Config = $psitem.Name $entry = $sync.configs.tweaks.$Config $registryKeys = $entry.registry - $serviceKeys = $entry.service + $entryType = $entry.Type $appxKeys = $entry.appx $invokeScript = $entry.InvokeScript - $entryType = $entry.Type - if ($registryKeys -or $serviceKeys) { + if ($registryKeys) { $Values = @() if ($entryType -eq "Toggle") { @@ -100,20 +99,6 @@ Function Invoke-WinUtilCurrentSystem { } } - Foreach ($tweaks in $serviceKeys) { - Foreach ($tweak in $tweaks) { - $Service = Get-Service -Name $tweak.Name - - if ($Service) { - $actualValue = $Service.StartType - $expectedValue = $tweak.StartupType - if ($expectedValue -ne $actualValue) { - $values += $False - } - } - } - } - if ($values -notcontains $false) { Write-Output $Config } From 8a93c3f06350f64b0b6a0e05869ff30d3740762e Mon Sep 17 00:00:00 2001 From: Gabi <218829269+GabiNun2@users.noreply.github.com> Date: Fri, 5 Jun 2026 07:24:44 +0300 Subject: [PATCH 5/5] Update Invoke-WinUtilCurrentSystem.ps1 --- functions/private/Invoke-WinUtilCurrentSystem.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/private/Invoke-WinUtilCurrentSystem.ps1 b/functions/private/Invoke-WinUtilCurrentSystem.ps1 index 57d54a6b79..5c50fee512 100644 --- a/functions/private/Invoke-WinUtilCurrentSystem.ps1 +++ b/functions/private/Invoke-WinUtilCurrentSystem.ps1 @@ -50,9 +50,9 @@ Function Invoke-WinUtilCurrentSystem { $Config = $psitem.Name $entry = $sync.configs.tweaks.$Config $registryKeys = $entry.registry - $entryType = $entry.Type $appxKeys = $entry.appx $invokeScript = $entry.InvokeScript + $entryType = $entry.Type if ($registryKeys) { $Values = @()