Bat
Bat
mode 100,25
color F4
goto :ENSURE_ADMIN_RIGHTS
:MENU
cls
echo Press [O] Optimize Windows and the Internet
echo Press [R] To change the IP address (if the IP address is dynamic)
echo Press [C] To clear trash and temporary files
echo Press [P] To set a high priority for minecraft
echo Press [F] If the Internet is not working / working unusually very slowly, or
the like.
echo Press [G] To enable process grouping svchosts.exe
echo Press [S] Turn off system security patches to improve performance
echo Press [L] Enable large size for the system cache
echo Press [D] Turn off most unnecessary services
echo Press [U] Turn off UAC (Account Control system)
:O
:: This command sets the autotuning level of TCP to normal. This can be a useful
optimization for some systems, but in some cases, it can also cause problems with
network throughput
netsh int tcp set global autotuninglevel=normal
:: This command enables data center awareness (DCA) for TCP connections
netsh int tcp set global dca=enabled
:: This command enables network direct memory access (NetDMA) for TCP connections.
NetDMA can help reduce CPU usage during network transfers, but it can also cause
compatibility issues with some network adapters. You can keep this command as is,
but if you experience any issues with network performance or compatibility, you may
need to disable it
netsh int tcp set global netdma=enabled
:: This command enables TCP Fast Open (TFO) for TCP connections. TFO can help
reduce latency for network connections
netsh int tcp set global fastopen=enabled
:: This command disables Non-SACK Retransmit Timeout Resiliency (NSRT) for TCP
connections. NSRT is a feature that can help improve network performance in some
cases
netsh int tcp set global nonsackrttresiliency=disabled
:: This command disables Receive Segment Coalescing (RSC) for TCP connections. RSC
is a feature that can help improve network performance by reducing CPU usage during
network transfers, but it may increase latency, so we disabling it
netsh int tcp set global rsc=disabled
:: This command sets the maximum number of SYN retransmissions for TCP connections
to Press. This can help improve network performance in some cases
netsh int tcp set global maxsynretransmissions=Press
:: This command sets the initial retransmission timeout (RTO) for TCP connections
to 2000 milliseconds. This can help improve network performance in some cases
netsh int tcp set global initialRto=2000
:: This command sets the congestion provider for TCP connections to Compound TCP
(CTCP). CTCP is designed to optimize network performance in high-bandwidth, high-
delay networks
netsh int tcp set supplemental Internet congestionprovider=ctcp
:: This command enables the TCP no delay option for Microsoft Message Queuing
(MSMQ), which can improve performance in some scenarios
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters" /v "TCPNoDelay" /t
REG_DWORD /d "1" /f
:: This key disables the Nagle algorithm, which can improve performance for
applications that send small packets, such as minecraft
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /v
"TcpNoDelay" /t REG_DWORD /d "1" /f
:: These commands sets the network throttling index and system responsive to the
maximum value, which can potentially improve network and system performance in some
cases
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\
Multimedia\SystemProfile" /v "NetworkThrottlingIndex" /t REG_DWORD /d "00000010" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\
Multimedia\SystemProfile" /v "SystemResponsiveness" /t REG_DWORD /d "0000000a" /f
:: This command disables the non-best effort limit feature in the QoS Packet
Scheduler, which can potentially improve network performance in some cases
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Psched" /v
"NonBestEffortLimit" /t REG_DWORD /d "0" /f
:: This command sets the priority of the IRQ8 interrupt to 1, which can potentially
improve system performance in some cases.
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\PriorityControl" /v
"IRQ8Priority" /t REG_DWORD /d "1" /f
:: This command sets the priority of the TCP/IP protocol to the highest possible
value (class 8)
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\
ServiceProvider" /v "Class" /t REG_DWORD /d "8" /f
:: This command sets the priority of the DNS service to a high value (6)
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\
ServiceProvider" /v "DnsPriority" /t REG_DWORD /d "6" /f
:: This command increases the IRP stack size for network operations. It may improve
network performance in some cases
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /v "IRPStackSize"
/t REG_DWORD /d "64" /f
:: This command disables the Desktop Window Manager (DWM) composition feature.
Disabling this feature can reduce the use of system resources, but may also lead to
decreased visual quality in some cases
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\DWM" /v
"CompositionPolicy" /t REG_DWORD /d "0" /f
:: This command sets the timestamp interval to 0, which can help improve system
performance by reducing the frequency of logging events. However, if you need to
troubleshoot any issues, it may be helpful to increase the timestamp interval
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\
Reliability" /v "TimeStampInterval" /t REG_DWORD /d "0" /f
:: This commands disable GameDVR, a feature that allows users to record and share
gameplay footage. Disabling this feature can potentially free up system resources
and improve performance, especially for lower-end systems
reg add "HKCU\System\GameConfigStore" /v "GameDVR_Enabled" /t REG_DWORD /d "0" /f
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v
"AppCaptureEnabled" /t REG_DWORD /d "0" /f
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v
"AppCaptureEnabled" /t REG_DWORD /d "0" /f
:: This command adjusts Dedicated Segment Size for Intel Graphics: This command
adjusts the dedicated segment size for Intel Graphics, which can potentially
improve performance for systems with integrated Intel graphics
reg add "HKLM\SOFTWARE\Intel\GMM" /v "DedicatedSegmentSize" /t REG_DWORD /d
"1298" /f
:: This command disables the bandwidth throttling feature on your computer. This
can be useful if you want to prioritize network traffic for specific applications
or services. However, keep in mind that this can also have negative effects on
other network traffic
reg add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" /v
"DisableBandwidthThrottling" /t REG_DWORD /d "1" /f
:: This command disables the Web Services for Devices (WSD) protocol. This can help
reduce network congestion and improve network performance
reg add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" /v
"EnableWsd" /t REG_DWORD /d "0" /f
:: This command increases the maximum TCP window size, which can help improve
network throughput for high-bandwidth connections. However, this change may not
have a noticeable impact on slower connections
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Performance" /v
"GlobalMaxTcpWindowSize" /t REG_DWORD /d "1073741823" /f
:: This command enables network throttling for SMB connections, which can help
prevent network congestion and improve overall network performance. However, if
you're experiencing slow network performance, disabling this feature may help
reg add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" /v
"Throttling" /t REG_DWORD /d "1" /f
:: This command disables delayed acknowledgement, which can improve performance for
applications that send small packets, such as minecraft
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /v
"TCPDelAckTicks" /t REG_DWORD /d "0" /f
:: This command sets the maximum number of retransmissions for a TCP segment
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /v
"TcpMaxDataRetransmissions" /t REG_DWORD /d "3" /f
:: This command sets the value of the "DefaultTTL" key under "Tcpip\Parameters" to
32767. This key sets the default Time To Live (TTL)
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /v
"DefaultTTL" /t REG_DWORD /d "32767" /f
:: This command sets the DNS resolution priority in the TCP/IP stack. The default
value is 0, and the maximum value is 5000. Setting it to a high value like 1469 may
prioritize DNS queries over other network traffic, potentially improving DNS
resolution times
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /v
"DnsPriority" /t REG_DWORD /d "1469" /f
:: This command sets the priority of using the local Hosts file for name
resolution. The default value is 500, and the maximum value is 5000. Setting it to
a high value like 572 may prioritize local name resolution over other network
traffic, potentially improving name resolution times for locally defined hosts
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /v
"HostsPriority" /t REG_DWORD /d "572" /f
:: This command sets the priority of using locally attached network interfaces. The
default value is 0, and the maximum value is 5000. Setting it to a high value like
91 may prioritize network traffic on locally attached interfaces over other network
traffic, potentially improving local network performance
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /v
"LocalPriority" /t REG_DWORD /d "91" /f
:: This command sets the priority of using NetBIOS over TCP/IP for name resolution.
The default value is 0, and the maximum value is 5000. Setting it to a high value
like 45 may prioritize NetBIOS name resolution over other network traffic,
potentially improving name resolution times for NetBIOS name
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /v
"NetbtPriority" /t REG_DWORD /d "45" /f
:: This command sets the number of sequential packet drops required to trigger a
change in the MTU size for a connection. The default value is 5, and the
recommended value is between Press and 5. Setting it to a lower value like 3 may
allow for quicker MTU adjustments for better performance over high-latency networks
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /v
"QualifyingDestinationThreshold" /t REG_DWORD /d "3" /f
:: This command specifies the number of hash table buckets that the DNS client
should use for caching name resolution data. A value of 1 is recommended for most
systems
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters" /v
"CacheHashTableBucketSize" /t REG_DWORD /d "1" /f
:: This command specifies the size, in kilobytes, of the hash table used for
caching name resolution data. A value of 384 is recommended for most systems
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters" /v
"CacheHashTableSize" /t REG_DWORD /d "384" /f
:: This command specifies the maximum time, in seconds, that the DNS cache should
retain a positive name resolution result. A value of 64000 is recommended for most
systems
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters" /v
"MaxCacheEntryTtlLimit" /t REG_DWORD /d "64000" /f
:: This command specifies the maximum time, in seconds, that the DNS cache should
retain a Start of Authority (SOA) record. A value of 301 is recommended for most
systems
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters" /v
"MaxSOACacheEntryTtlLimit" /t REG_DWORD /d "301" /f
:: This command sets affinity to 0, which means that the task can run on any
available processor
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\
SystemProfile\Tasks\Games" /v "Affinity" /t REG_DWORD /d "0" /f
:: This command disables the Web Services for Devices (WSD) protocol. Disabling WSD
can be beneficial if you don't use it. It helps reduce network traffic
reg add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" /v
"EnableWsd" /t REG_DWORD /d "0" /f
:: This command enables Path MTU Discovery, which is generally a good practice. It
allows the operating system to automatically discover the maximum MTU (Maximum
Transmission Unit) size for the network path
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /v
"EnablePMTUDiscovery" /t REG_DWORD /d "1" /f
:: This command enables ICMP Redirect, which allows routers to inform your system
about better routes for network traffic. ICMP Redirects can help optimize network
routing
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /v
"EnableICMPRedirect" /t REG_DWORD /d "1" /f
:: This command enables the Dead Gateway Detection. Dead Gateway Detection helps in
identifying and avoiding non-responsive gateways
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /v
"DeadGWDeadGWDetectDefault" /t REG_DWORD /d "1" /f
:: This command sets the default behavior of not adding a default gateway. Setting
it to 0 means that the default gateway will be added automatically
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /v
"DontAddDefaultGatewayDefault" /t REG_DWORD /d "0" /f
:: This command enables Direct Cache Access (DCA). DCA allows network adapters to
directly access the processor cache, improving network performance
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /v "EnableDCA" /t
REG_DWORD /d "1" /f
:: This command sets the Negative Cache Time to 0, effectively disabling negative
caching. Negative caching allows the DNS resolver to remember failed DNS lookups
and avoid repeating them for a certain duration. Disabling negative caching may
increase the DNS query load and potentially impact performance, especially for
repeated failed lookups
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters" /v
"NegativeCacheTime" /t REG_DWORD /d "0" /f
:: This command sets the Net Failure Cache Time to 0, effectively disabling net
failure caching. Net failure caching allows the DNS resolver to remember network
failures and avoid querying non-responsive DNS servers for a certain duration.
Disabling net failure caching may increase the DNS query load and potentially
impact performance, especially in scenarios with intermittent network connectivity
issues
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters" /v
"NetFailureCacheTime" /t REG_DWORD /d "0" /f
:: This command sets the Negative SOA Cache Time to 0, effectively disabling
negative caching for SOA records. Negative SOA caching helps avoid unnecessary
queries for domains with missing or invalid SOA records. Disabling negative SOA
caching may increase the DNS query load and potentially impact performance,
especially in scenarios where domains frequently have missing or invalid SOA
records
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters" /v
"NegativeSOACacheTime" /t REG_DWORD /d "0" /f
:: This command disables the "lazy mode" for multimedia processing. Lazy mode is a
power-saving feature that allows the system to conserve resources when multimedia
applications are idle. Disabling it may improve multimedia performance but could
increase power consumption
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\
SystemProfile" /v "NoLazyMode" /t REG_DWORD /d "1" /f
:: This command sets BuffersInFlight value. This value determines the number of
buffers used by the display driver (in this case, for NVIDIA graphics cards).
Increasing this value can potentially improve graphics performance in certain
scenarios, but it depends on the specific hardware and drivers
reg add "HKLM\SYSTEM\ControlSet001\Services\nvlddmkm" /v "BuffersInFlight" /t
REG_DWORD /d "4096" /f
:: This command sets GPU priority value for games. A value of 8 indicates high GPU
priority. This can prioritize graphics performance for games but may affect other
applications that rely on GPU resources. Adjusting this value may provide
optimization for gaming
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\
SystemProfile\Tasks\Games" /v "GPU Priority" /t REG_DWORD /d "8" /f
:: This command sets CPU priority value for games. A value of Press indicates high
CPU priority. This can help optimize CPU performance for games
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\
SystemProfile\Tasks\Games" /v "Priority" /t REG_DWORD /d "Press" /f
:: This command sets task scheduling priority for games to higher value.
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\
SystemProfile\Tasks\Games" /v "Scheduling Category" /t REG_SZ /d "High" /f
choice /N /C:YN /M "Do you want to restart your computer for the best commands
effect? [Y/n]:"
cls
if %errorlevel% ==1 shutdown /s /t 5
:R
:: Renewing IP address
netsh int ipv4 reset reset.log
netsh int ipv6 reset reset.log
ipconfig /release
ipconfig /renew
netsh winsock reset
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory
Management" /v DisablePagingExecutive /t REG_DWORD /d 1 /f
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v
DisableNotificationCenter /t REG_DWORD /d 1 /f
REG ADD "HKCU\Control Panel\Mouse" /v MouseHoverTime /t REG_SZ /d 0 /f
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v
ExtendedUIHoverTime /t REG_DWORD /d 0 /f
REG ADD "HKLM\Software\Policies\Microsoft\Windows\Personalization" /v
NoLockScreen /t REG_DWORD /d 1 /f
REG ADD "HKLM\Software\Policies\Microsoft\Windows\Personalization" /v
LockScreenImage /t REG_SZ /d 0 /f
REG ADD "HKLM\System\CurrentControlSet\Services\LanmanServer\Parameters" /v Smb2 /t
REG_DWORD /d 0 /f
REG ADD "HKLM\System\CurrentControlSet\Services\SensorDataService\Parameters" /v
ServiceDllUnloadOnStop /t REG_DWORD /d 0 /f
:C
:: Clean up unnecessary temporary files
del /q/f/s %TEMP%\*
:P
:: Setting high priority for minecraft
wmic process where name="javaw.exe" CALL setpriority "128"
:F
:: If there were any problems with the internet - it does not work / works
unusually very slowly, etc.
ipconfig /flushdns
netsh winsock reset catalog
netsh int tcp reset
netsh interface ip delete arpcache
netsh int tcp set heuristics disabled
netsh int tcp set global rss=enabled
netsh int tcp set global chimney=disabled
netsh int tcp set global netdma=enabled
:ENSURE_ADMIN_RIGHTS
net session >nul Press>&1
if %errorLevel% == 0 (
goto :MENU
)
else (
cls
echo You must open this batch file with admin rights to continue.
pause
goto :MENU
)
:G
:: taskkill /f /im svchost.exe
start svchost.exe
pause
goto :MENU
:S
:: net stop wuauserv
sc config wuauserv start= disabled
echo System security patches disabled. Please restart your computer for changes to
take effect.
pause
goto :MENU
:L
:: chcp 65001
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory
Management" /v "LargeSystemCache" /t REG_DWORD /d 1 /f
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory
Management" /v "SizeOfSystemCache" /t REG_DWORD /d 3 /f
pause
goto :MENU
:D
:: sc config "Appinfo" start= disabled
sc config "RMSvc" start= disabled
sc config "UsoSvc" start= disabled
sc config "ShellHWDetection" start= disabled
sc config "SSDPSRV" start= disabled
sc config "sppsvc" start= disabled
sc config "AeLookupSvc" start= disabled
sc config "Dnscache" start= disabled
sc config "DPS" start= disabled
sc config "WdiServiceHost" start= disabled
sc config "WdiSystemHost" start= disabled
sc config "Spooler" start= disabled
sc config "CertPropSvc" start= disabled
sc config "HomeGroupListener" start= disabled
sc config "HomeGroupProvider" start= disabled
sc config "iphlpsvc" start= disabled
sc config "lmhosts" start= disabled
sc config "MMCSS" start= disabled
sc config "PerfHost" start= disabled
sc config "TrkWks" start= disabled
sc config "UxSms" start= disabled
sc config "WMPNetworkSvc" start= disabled
sc config "WSearch" start= disabled
sc config "wscsvc" start= disabled
sc config "wuauserv" start= disabled
pause
goto :MENU
:U
:: cd "C:\Windows\System32"
cmd.exe /k "c:\Windows\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\
CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f"
pause
goto :MENU