Noktomezo

Group SvcHost Services

Feb 1st, 2025 (edited)
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Winbatch 2.83 KB | Source Code | 0 0
  1. :: ─────────────────────────────────────────────────────────────────────────────
  2. :: 📚 GROUP SVCHOSTS SERVICES
  3. :: ─────────────────────────────────────────────────────────────────────────────
  4. :: 📖 Reduces the number of SvcHost services by grouping them, thus freeing up RAM
  5. :: ─────────────────────────────────────────────────────────────────────────────
  6. :: ⚠️ Only use it if your PC has more than 3.5gb RAM
  7. :: ─────────────────────────────────────────────────────────────────────────────
  8. :: ©️ Copy & Paste it to your own .cmd/.bat file
  9. :: ─────────────────────────────────────────────────────────────────────────────
  10.  
  11.  
  12.  
  13. :: 📜 SCRIPT
  14. :: ─────────────────────────────────────────────────────────────────────────────
  15.  
  16. :: The WMIC system component is required to obtain the exact amount of RAM
  17. DISM /Online /Add-Capability /CapabilityName:WMIC~~~~
  18.  
  19. for /f "tokens=2 delims==" %%i in ('wmic os get TotalVisibleMemorySize /value') do set /a mem=%%i + 1024000
  20. reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control" /v "SvcHostSplitThresholdInKB" /t REG_DWORD /d %mem% /f
  21.  
  22. :: ─────────────────────────────────────────────────────────────────────────────
  23.  
  24.  
  25.  
  26. :: 🔁 RESTORE DEFAULT VALUES
  27. :: ─────────────────────────────────────────────────────────────────────────────
  28.  
  29. reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control" /v "SvcHostSplitThresholdInKB" /t REG_DWORD /d 3670016 /f
  30.  
  31. :: ─────────────────────────────────────────────────────────────────────────────
Advertisement
Add Comment
Please, Sign In to add comment