|
::注册表挂载
reg load "HKLM\SYS" "%~dp0\Windows\system32\config\system"
IF ERRORLEVEL 1 ECHO 离线注册表system加载_失败
IF ERRORLEVEL 0 ECHO 离线注册表system加载_成功
reg load "HKLM\DEFAULT_lin" "%~dp0\Windows\system32\config\DEFAULT"
IF ERRORLEVEL 1 ECHO 离线注册表DEFAULT加载_失败
IF ERRORLEVEL 0 ECHO 离线注册表DEFAULT加载_成功
reg load "HKLM\SOFTWARE_lin" "%~dp0\Windows\system32\config\SOFTWARE"
IF ERRORLEVEL 1 ECHO 离线注册表SOFTWARE加载_失败
IF ERRORLEVEL 0 ECHO 离线注册表SOFTWARE加载_成功
@ECHO 离线服务_优化
Reg.exe add "HKLM\SYS\ControlSet001\Services\AppMgmt" /v "Start" /t REG_DWORD /d "4" /f
Reg.exe add "HKLM\SYS\ControlSet001\Services\AppVClient" /v "Start" /t REG_DWORD /d "4" /f
Reg.exe add "HKLM\SYS\ControlSet001\Services\CscService" /v "Start" /t REG_DWORD /d "4" /f
Reg.exe add "HKLM\SYS\ControlSet001\Services\defragsvc" /v "Start" /t REG_DWORD /d "4" /f
Reg.exe add "HKLM\SYS\ControlSet001\Services\diagnosticshub.standardcollector.service" /v "Start" /t REG_DWORD /d "4" /f
::注册表卸载
reg unload "HKLM\SYS"
IF ERRORLEVEL 0 ECHO 离线注册表[system]卸载_√
IF ERRORLEVEL 1 ECHO 离线注册表[system]卸载_×
reg unload "HKLM\DEFAULT_lin"
IF ERRORLEVEL 0 ECHO 离线注册表[DEFAULT]卸载_√
IF ERRORLEVEL 1 ECHO 离线注册表[DEFAULT]卸载_×
reg unload "HKLM\SOFTWARE_lin"
IF ERRORLEVEL 0 ECHO 离线注册表[SOFTWARE]卸载_√
IF ERRORLEVEL 1 ECHO 离线注册表[SOFTWARE]卸载_×
echo 当前:%str:~0,1%
echo "延迟15秒自动退出"
@ping -n 15 127.1 >nul
Exit
|
|