Update-WPFTweaksTele (#3775)

* Update WPFTweaksTele's InvokeScript

* Update WPFTweaksTele's InvokeScript
This commit is contained in:
Gabi
2025-12-12 16:46:54 +02:00
committed by GitHub
parent 3cb0a4b664
commit 2e0073af75

View File

@@ -2029,38 +2029,9 @@
],
"InvokeScript": [
"
bcdedit /set `{current`} bootmenupolicy Legacy | Out-Null
If ((get-ItemProperty -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\" -Name CurrentBuild).CurrentBuild -lt 22557) {
$taskmgr = Start-Process -WindowStyle Hidden -FilePath taskmgr.exe -PassThru
Do {
Start-Sleep -Milliseconds 100
$preferences = Get-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\TaskManager\" -Name \"Preferences\" -ErrorAction SilentlyContinue
} Until ($preferences)
Stop-Process $taskmgr
$preferences.Preferences[28] = 0
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\TaskManager\" -Name \"Preferences\" -Type Binary -Value $preferences.Preferences
}
Remove-Item -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\MyComputer\\NameSpace\\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}\" -Recurse -ErrorAction SilentlyContinue
# Fix Managed by your organization in Edge if regustry path exists then remove it
If (Test-Path \"HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge\") {
Remove-Item -Path \"HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge\" -Recurse -ErrorAction SilentlyContinue
}
# Group svchost.exe processes
$ram = (Get-CimInstance -ClassName Win32_PhysicalMemory | Measure-Object -Property Capacity -Sum).Sum / 1kb
Set-ItemProperty -Path \"HKLM:\\SYSTEM\\CurrentControlSet\\Control\" -Name \"SvcHostSplitThresholdInKB\" -Type DWord -Value $ram -Force
$autoLoggerDir = \"$env:PROGRAMDATA\\Microsoft\\Diagnosis\\ETLLogs\\AutoLogger\"
If (Test-Path \"$autoLoggerDir\\AutoLogger-Diagtrack-Listener.etl\") {
Remove-Item \"$autoLoggerDir\\AutoLogger-Diagtrack-Listener.etl\"
}
icacls $autoLoggerDir /deny SYSTEM:`(OI`)`(CI`)F | Out-Null
# Disable Defender Auto Sample Submission
Set-MpPreference -SubmitSamplesConsent 2 -ErrorAction SilentlyContinue | Out-Null
"
# Disable Defender Auto Sample Submission
Set-MpPreference -SubmitSamplesConsent 2
"
],
"link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/tele"
},