Skip to content

Commit

Permalink
Improves performance.
Browse files Browse the repository at this point in the history
  • Loading branch information
Redax6996 committed Jun 28, 2023
1 parent 21a2c16 commit b32bd91
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion improvePer.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
@echo off
regedit /s "ImprovePerformance.reg"
regedit /s "impPer2.reg"

setlocal enabledelayedexpansion


set "excluded_services=WinRM SecurityHealthService"


for /F "tokens=1-3" %%A in ('sc query state^=all ^| findstr "SERVICE_NAME STATE"') do (
set "service_name=%%B"
set "service_state=%%C"


if "!excluded_services:%%B=!"=="!excluded_services!" if "!service_state!" neq "DISABLED" (

sc config "!service_name!" start= demand
echo Service "!service_name!" set to manual.
)
)





echo Operation completed! Moving on...
timeout 2 > nul
start "Virtual Machines" novms.bat
start "Virtual Machines" novms.bat

0 comments on commit b32bd91

Please sign in to comment.