@echo off setlocal EnableExtensions EnableDelayedExpansion title Performancify Network Tweaks color 0F cls set "NICROOT=HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}" set "LOG=%~dp0Performancify_Network_Log.txt" for /f %%T in ('powershell -NoProfile -Command "Get-Date -Format yyyyMMdd_HHmmss"') do set "STAMP=%%T" set "BACKUP=%~dp0Performancify_NIC_Backup_%STAMP%.reg" echo. echo ================================================== echo Performancify Network Tweaks echo ================================================== echo. echo Applying cleaner network performance settings... echo. net session >nul 2>&1 if not "%errorlevel%"=="0" ( echo [ERROR] Please run this file as Administrator. echo. pause exit /b ) echo [+] Creating registry backup... reg export "%NICROOT%" "%BACKUP%" /y >> "%LOG%" 2>&1 if exist "%BACKUP%" ( echo [OK] Backup saved: echo %BACKUP% ) else ( echo [WARNING] Backup could not be created. ) echo. echo [+] Creating Windows restore point... powershell -NoProfile -ExecutionPolicy Bypass -Command "try { Checkpoint-Computer -Description 'Performancify Network Tweaks' -RestorePointType 'MODIFY_SETTINGS' | Out-Null } catch {}" >> "%LOG%" 2>&1 echo. echo [+] Optimizing network adapters... echo. for /f "tokens=*" %%K in ('reg query "%NICROOT%" /s 2^>nul ^| findstr /r "\\[0-9][0-9][0-9][0-9]$"') do ( reg query "%%K" /v "DriverDesc" >nul 2>&1 if "!errorlevel!"=="0" ( echo ------------------------------------------ for /f "tokens=2,*" %%A in ('reg query "%%K" /v "DriverDesc" 2^>nul ^| findstr /i "DriverDesc"') do echo Adapter: %%B call :SetSz "%%K" "*DeviceSleepOnDisconnect" "0" call :SetSz "%%K" "*EEE" "0" call :SetSz "%%K" "AdvancedEEE" "0" call :SetSz "%%K" "EEELinkAdvertisement" "0" call :SetSz "%%K" "EnableGreenEthernet" "0" call :SetSz "%%K" "GigaLite" "0" call :SetSz "%%K" "PowerSavingMode" "0" call :SetSz "%%K" "ReduceSpeedOnPowerDown" "0" call :SetSz "%%K" "AutoDisableGigabit" "0" call :SetSz "%%K" "*WakeOnMagicPacket" "0" call :SetSz "%%K" "*WakeOnPattern" "0" call :SetSz "%%K" "*ModernStandbyWoLMagicPacket" "0" call :SetSz "%%K" "WakeOnLink" "0" call :SetSz "%%K" "WakeOnMagicPacketFromS5" "0" call :SetSz "%%K" "WakeOnSlot" "0" call :SetSz "%%K" "EnablePME" "0" call :SetSz "%%K" "WaitAutoNegComplete" "0" call :SetSz "%%K" "WolShutdownLinkSpeed" "2" call :SetSz "%%K" "*InterruptModeration" "0" call :SetSz "%%K" "InterruptModeration" "0" call :SetSz "%%K" "*FlowControl" "0" call :SetSz "%%K" "FlowControl" "0" call :SetSz "%%K" "*RSS" "1" call :SetSz "%%K" "RSS" "1" call :SetSz "%%K" "ReceiveSideScaling" "1" call :SetDword "%%K" "PNPCapabilities" "24" ) ) echo. echo [+] Disabling old NetBIOS over TCP/IP... for /f "tokens=*" %%I in ('reg query "HKLM\SYSTEM\CurrentControlSet\Services\NetBT\Parameters\Interfaces" 2^>nul ^| findstr /i "Tcpip_"') do ( reg add "%%I" /v "NetbiosOptions" /t REG_DWORD /d 2 /f >> "%LOG%" 2>&1 echo [OK] NetBIOS disabled on interface ) echo. echo [+] Applying Windows TCP settings... netsh int tcp set global rss=enabled >> "%LOG%" 2>&1 netsh int tcp set global autotuninglevel=normal >> "%LOG%" 2>&1 netsh int tcp set global ecncapability=disabled >> "%LOG%" 2>&1 netsh int tcp set global timestamps=disabled >> "%LOG%" 2>&1 echo. echo [+] Disabling PCIe link power saving... powercfg /setacvalueindex SCHEME_CURRENT SUB_PCIEXPRESS ASPM 0 >nul 2>&1 powercfg /setactive SCHEME_CURRENT >nul 2>&1 echo. echo [+] Flushing DNS cache... ipconfig /flushdns >nul 2>&1 echo. echo ================================================== echo Performancify Tweaks Finished echo ================================================== echo. echo Restart your PC for all changes to fully apply. echo Backup file: echo %BACKUP% echo. pause exit /b :SetSz reg query "%~1" /v "%~2" >nul 2>&1 if "%errorlevel%"=="0" ( reg add "%~1" /v "%~2" /t REG_SZ /d "%~3" /f >> "%LOG%" 2>&1 echo [OK] %~2 = %~3 ) exit /b :SetDword reg query "%~1" /v "%~2" >nul 2>&1 if "%errorlevel%"=="0" ( reg add "%~1" /v "%~2" /t REG_DWORD /d "%~3" /f >> "%LOG%" 2>&1 echo [OK] %~2 = %~3 ) exit /b