黑暗之光吧 关注:25,803贴子:260,582
  • 1回复贴,共1

[转自黑暗之光论坛]长时间挂机以及多开后卡的解决办法

只看楼主收藏回复

很多玩友在玩游戏的时候都喜欢长时间挂机或者多开,经过一段时间之后,电脑就会变的比较卡,你是否会为此闹心呢,解决办法如下:
,新建一个TXT文档,复制以上代码,然后重命名为BAT。
------------------------------------------------------------------------
:Start
@echo off&cls&title 一键清理 欢迎交流完善
echo.&echo.
echo 一键清理
echo.&echo.
echo [1] 结束非系统进程
echo [2] 清理系统垃圾
echo [3] 清理自启动
echo [4] 清理计划任务
echo.&echo.
set input=
set /p input= 请输入序号并回车执行【直接回车执行全部】:
if "%input%"=="" call :CleanProcess&call :CleanTemp&call :CleanAutorun&call :CleanTasks&goto End
if %input%==1 call :CleanProcess pause&goto Start
if %input%==2 call :CleanTemp&goto Start
if %input%==3 call :CleanAutorun&goto Start
if %input%==4 call :CleanTasks&goto Start
:CleanProcess
cls&echo.&echo.
echo 一键清理非系统进程 cmd@xp
echo.&echo.
echo ◇ 执行过程中请勿关闭本程序!如被防火墙拦截请允许运行!
echo ◇ 假如无法自动恢复桌面,请重新执行一次。或:
echo 1、用组合键【Ctrl+Alt+Del】打开【任务管理器】;
echo 2、在【新建任务】中输入【explorer.exe】回车即可。
echo 或依次执行【新任务】【浏览】【%SYSTEMROOT%\explorer.exe】。
echo; —————————————————————————————————————
echo. 【请阅读以上说明,保存好数据之后执行!】
%1
setlocal enabledelayedexpansion&title %~n0
taskkill /f /im explorer.exe
for /f "skip=3 tokens=2" %%i in ('TASKLIST /FI "WINDOWTITLE eq %~n0" /FI "STATUS eq running"') do (
for /f "skip=3 tokens=1,2" %%a in ('tasklist^|findstr /i /v "System smss.exe csrss.exe winlogon.exe services.exe lsass.exe svchost.exe conime.exe explorer.exe wmiprvse.exe Userinit.exe taskkill.exe spoolsv.exe ctfmon.exe alg.exe tasklist.exe findstr.exe"') do (
if /i "%%a"=="cmd.exe" (if not "%%~b"=="%%~i" taskkill /f /t /pid %%b) else taskkill /f /t /pid %%b
)
)
taskkill /f /t /im findstr.exe
start %windir%\explorer.exe
goto :eof
:CleanTemp
echo.&echo.
echo 一键清理系统垃圾
echo; —————————————————————————————————————
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*._mp
del /f /s /q %systemdrive%\*.log
del /f /s /q %systemdrive%\*.gid
del /f /s /q %systemdrive%\*.chk
del /f /s /q %systemdrive%\*.old
del /f /s /q %systemdrive%\recycled\*.*
del /f /s /q %windir%\*.bak
del /f /s /q %windir%\*.tmp
del /f /s /q %windir%\prefetch\*.*
rd /s /q %windir%\temp & md %windir%\temp
rd /s /q %temp% & md %temp%
del /f /q %userprofile%\cookies\*.*
del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"
del /f /s /q "%userprofile%\Local Settings\Temp\*.*"
del /f /s /q "%userprofile%\recent\*.*"
goto :eof
:CleanAutorun
echo.&echo.
echo 一键清理自启动项
echo; —————————————————————————————————————
(reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /va /f)||(for /f "skip=4 tokens=1" %%a in ('reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run') do reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v %%a /f)
(reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Run /va /f)||(for /f "skip=4 tokens=1" %%a in ('reg query HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run') do reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v %%a /f)
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Run /v ctfmon.exe /d %SYSTEMROOT%\system32\ctfmon.exe /f
del "%ALLUSERSPROFILE%\「开始」菜单\程序\启动\*.*" /q /f
del "%USERPROFILE%\「开始」菜单\程序\启动\*.*" /q /f
del "%SYSTEMDRIVE%\Docume~1\Default User\「开始」菜单\程序\启动\*.*" /q /f
goto :eof
:CleanTasks
echo.&echo.
echo 一键清理计划任务
echo; —————————————————————————————————————
at /delete /yes||SCHTASKS /Delete /TN * /F
del /f /q /a %SYSTEMROOT%\Tasks
goto :eof
:End
echo.&echo.
echo 清理完毕,自动退出!
echo.
ping /n 3 127.0.1>nul
goto :eof


1楼2014-04-29 14:53回复
    高手总是在民间~~~~


    2楼2014-04-29 14:55
    回复