Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 20 additions & 33 deletions config/tweaks.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,11 @@
"Description": "Disables Location Tracking.",
"category": "Essential Tweaks",
"panel": "1",
"service": [
{
"Name": "lfsvc",
"StartupType": "Disable",
"OriginalType": "Manual"
}
"InvokeScript": [
"Set-Service -Name lfsvc -StartupType Disabled"
],
"UndoScript": [
"Set-Service -Name lfsvc -StartupType Manual"
],
"registry": [
{
Expand Down Expand Up @@ -177,39 +176,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": {
Expand Down
17 changes: 1 addition & 16 deletions functions/private/Invoke-WinUtilCurrentSystem.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,11 @@ Function Invoke-WinUtilCurrentSystem {
$Config = $psitem.Name
$entry = $sync.configs.tweaks.$Config
$registryKeys = $entry.registry
$serviceKeys = $entry.service
$appxKeys = $entry.appx
$invokeScript = $entry.InvokeScript
$entryType = $entry.Type

if ($registryKeys -or $serviceKeys) {
if ($registryKeys) {
$Values = @()

if ($entryType -eq "Toggle") {
Expand Down Expand Up @@ -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
}
Expand Down
40 changes: 0 additions & 40 deletions functions/private/Set-WinUtilService.ps1

This file was deleted.

Loading