加入收藏 | 设为首页 | 会员中心 | 我要投稿 源码网 (https://www.900php.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 教程 > 正文

开机启动项清理代码bat版

发布时间:2016-12-04 16:37:01 所属栏目:教程 来源:站长网
导读:复制代码 代码如下: @echo offsetlocal enabledelayedexpansion mode con cols=61 lines=25color f5 mshta vbscript:msgbox("在运行程序前,请确认所有编辑资料已经保存",,"自制优化系统")(window.close) if exist tem.txt del /f /q tem.txt echo.正在刷
复制代码 代码如下:
@echo offsetlocal enabledelayedexpansion
mode con cols=61 lines=25color f5
mshta vbscript:msgbox("在运行程序前,请确认所有编辑资料已经保存",,"自制优化系统")(window.close)
if exist tem.txt del /f /q tem.txt
echo.正在刷选进程.............
echogt;gt;tem.txt explorer.exe
echogt;gt;tem.txt System Idle Process
echogt;gt;tem.txt System
echogt;gt;tem.txt smss.exe
echogt;gt;tem.txt csrss.exe
echogt;gt;tem.txt winlogon.exe
echogt;gt;tem.txt services.exe
echogt;gt;tem.txt TheWorld.exe
echogt;gt;tem.txt lsass.exe
echogt;gt;tem.txt svchost.exe
echogt;gt;tem.txt spoolsv.exe
echogt;gt;tem.txt alg.exe
echogt;gt;tem.txt ctfmon.exe
echogt;gt;tem.txt ekrn.exe
echogt;gt;tem.txt wdfmgr.exe
echogt;gt;tem.txt 360tray.exe
echogt;gt;tem.txt egui.exe
echogt;gt;tem.txt wmiprvse.exe
echogt;gt;tem.txt QQ.exe
echogt;gt;tem.txt cmd.exe
echogt;gt;tem.txt IEXPLORE.EXE
echogt;gt;tem.txt TXPlatform.exe
echogt;gt;tem.txt tasklist.exe
echogt;gt;tem.txt conime.exe
echogt;gt;tem.txt safeboxTray.exe
echogt;gt;tem.txt Thunder5.exe
echogt;gt;tem.txt tudouva.exe
for /f "eol= tokens=1,2 delims=," %%i in ('tasklist /nh /fo csv') do (
findstr /i /x %%i tem.txt gt;nul
if errorlevel 1 (
taskkill /f /pid %%j 1gt;nul 2gt;nul
)
)
del tem.txt echo 结束进程任务基本完成
echo ======================================
echo ==nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; ==
echo ======================================
echo 优化开机启动项
del /f /s /q "%systemdrive%Docume~1All Users「开始」菜单程序启动*.*"
del /f /s /q "%userprofile%「开始」菜单程序启动*.*"
for /f "delims=" %%j in ('fsutil fsinfo drives^|find /v ""') do (
del /f /q "%%j*.inf"gt;nul 2gt;nul del /f /q /ah "%%j*.exe" 2gt;nul
)
echogt;gt;tem.txt "egui"
echogt;gt;tem.txt "essact"
echogt;gt;tem.txt "CTFMON.EXE"
set key=SoftwareMicrosoftWindowsCurrentVersionrun
REG EXPORT "HKCU%key%" a.reg /nt4gt;nul
echo REGEDIT4 gt;b.reg
echo [HKEY_CURRENT_USER%key%] gt;gt;b.reg
for /f "skip=2 eol=[ tokens=1,2 delims==" %%a in (a.reg) do (
findstr /i %%a tem.txtgt;nul||echo %%a=- gt;gt;b.reg
)
for /f "skip=2 delims=[" %%m in ('find /i "run" a.reg') do (
echo ^[^-%%m gt;gt;b.reg
)
regedit /s b.reg
REG EXPORT "HKLM%key%" a.reg /nt4gt;nul
echo REGEDIT4 gt;b.reg
echo [HKEY_LOCAL_MACHINE%key%] gt;gt;b.reg
for /f "skip=2 eol=[ tokens=1,2 delims==" %%a in (a.reg) do (
findstr /i %%a tem.txtgt;nul||echo %%a=- gt;gt;b.reg
)
for /f "skip=2 delims=[" %%m in ('find /i "run" a.reg') do (
echo ^[^-%%m gt;gt;b.reg
)
regedit /s b.reg
del /q a.reg
del /q b.reg
del tem.txt
echo 已经优化好
echo ======================================
echo ==nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; ==
echo ======================================
echo 清理部分系统垃圾
del /f /q %systemdrive%*.tmpgt;nul 2gt;nul
del /f /q %systemdrive%*._mpgt;nul 2gt;nul
del /f /q %systemdrive%*.loggt;nul 2gt;nul
del /f /q %systemdrive%*.gidgt;nul 2gt;nul
del /f /q %systemdrive%*.chkgt;nul 2gt;nul
del /f /q %systemdrive%*.oldgt;nul 2gt;nul
del /f /q %windir%*.bakgt;nul 2gt;nul
del /f /q %windir%*.tmpgt;nul 2gt;nul
del /f /q %windir%prefetch*.*gt;nul 2gt;nul
del /f /s /q %systemdrive%recycled*.*gt;nul 2gt;nul
del /f /q "%ALLUSERSPROFILE%DocumentsDrWatson*.*"gt;nul 2gt;nul
del /f /q "%USERPROFILE%Cookies*.txt"gt;nul 2gt;nul
del /f /q /s "%TEMP%*.*"gt;nul 2gt;nul
del /f /q /s "%Systemroot%Prefetch*.*"gt;nul 2gt;nul
del /f /q "%USERPROFILE%Recent*.*"gt;nul 2gt;nul
del /f /q "%USERPROFILE%Application DataMicrosoftOfficeRecent*.lnk"gt;nul 2gt;nul
del /f /q /s "%USERPROFILE%Local SettingsTemp*.*"gt;nul 2gt;nul
rd /s /q %windir%temp md %windir%tempgt;nul 2gt;nul
if not exist %SystemRoot%MinidumpNUL del /f /q /s %SystemRoot%Minidump*.*gt;nul 2gt;nul
del /f /s /q "%userprofile%Local SettingsTemporary Internet Files*.*"gt;nul 2gt;nul
echo 已经清理了
mshta vbscript:msgbox("everything done!!",,"完成信息")(window.close)
taskkill /f /im cmd.exe

(编辑:源码网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读