-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tweak_Svchost.bat
38 lines (30 loc) · 1017 Bytes
/
Tweak_Svchost.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
@echo off
color F0
if not exist "C:\Svchost\AvenSvchost.log" (
mkdir "C:\Svchost"
echo This is your First Time Running the "Tweak Svchost.bat" >> C:\Svchost\AvenSvchost.log
) >nul 2>&1 && goto StartTheTweak
if exist "C:\Svchost\AvenSvchost.log" (
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control" /v "SvcHostSplitThresholdInKB" /t REG_DWORD /d "380000" /f
) >nul 2>&1 && goto DefaultFinished
:StartTheTweak
cls
for /f "tokens=2 delims==" %%i in ('wmic os get TotalVisibleMemorySize /format:value') do set MEM=%%i
set /a RAM=%MEM% + 1024000
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control" /v "SvcHostSplitThresholdInKB" /t REG_DWORD /d "%RAM%" /f
cls
echo Script Finished!
timeout 2 > nul
cls
echo Press any key to exit [...]
pause > nul
exit
:DefaultFinished
cls
echo Default Value for Split Threshold (Svchost.exe) Applied!
del /s /f /q "C:\Svchost\AvenSvchost.log" >nul 2>&1
timeout 3 > nul
cls
echo Press any key to exit [...]
pause > nul
exit