足球游戏_中国足彩网¥体育资讯$

开机启动项清理代码bat版
来源:易贤网 阅读:770 次 日期:2016-06-15 09:28:13
温馨提示:易贤网小编为您整理了“开机启动项清理代码bat版”,方便广大网友查阅!

这篇文章主要介绍了开机启动项清理代码,主要是通过bat实现,代码写的不错,喜欢批处理的朋友可以看下

代码如下:

@echo off&setlocal enabledelayedexpansion

mode con cols=61 lines=25&color f5

mshta vbscript:msgbox(在运行程序前,请确认所有编辑资料已经保存,,自制优化系统)(window.close)

if exist tem.txt del /f /q tem.txt

echo.正在刷选进程.............

echo>>tem.txt explorer.exe

echo>>tem.txt system idle process

echo>>tem.txt system

echo>>tem.txt smss.exe

echo>>tem.txt csrss.exe

echo>>tem.txt winlogon.exe

echo>>tem.txt services.exe

echo>>tem.txt theworld.exe

echo>>tem.txt lsass.exe

echo>>tem.txt svchost.exe

echo>>tem.txt spoolsv.exe

echo>>tem.txt alg.exe

echo>>tem.txt ctfmon.exe

echo>>tem.txt ekrn.exe

echo>>tem.txt wdfmgr.exe

echo>>tem.txt 360tray.exe

echo>>tem.txt egui.exe

echo>>tem.txt wmiprvse.exe

echo>>tem.txt qq.exe

echo>>tem.txt cmd.exe

echo>>tem.txt iexplore.exe

echo>>tem.txt txplatform.exe

echo>>tem.txt tasklist.exe

echo>>tem.txt conime.exe

echo>>tem.txt safeboxtray.exe

echo>>tem.txt thunder5.exe

echo>>tem.txt tudouva.exe

for /f eol= tokens=1,2 delims=, %%i in ('tasklist /nh /fo csv') do (

findstr /i /x %%i tem.txt >nul

if errorlevel 1 (

taskkill /f /pid %%j 1>nul 2>nul

)

)

del tem.txt & echo 结束进程任务基本完成

echo ======================================

echo == ==

echo ======================================

echo 优化开机启动项

del /f /s /q %systemdrive%\docume~1\all users\「开始」菜单\程序\启动\*.*

del /f /s /q %userprofile%\「开始」菜单\程序\启动\*.*

for /f delims=\ %%j in ('fsutil fsinfo drives^|find /v ') do (

del /f /q %%j\*.inf>nul 2>nul &del /f /q /ah %%j\*.exe 2>nul

)

echo>>tem.txt egui

echo>>tem.txt essact

echo>>tem.txt ctfmon.exe

set key=software\microsoft\windows\currentversion\run

reg export hkcu\%key% a.reg /nt4>nul

echo regedit4 >b.reg

echo [hkey_current_user\%key%] >>b.reg

for /f skip=2 eol=[ tokens=1,2 delims== %%a in (a.reg) do (

findstr /i %%a tem.txt>nul||echo %%a=- >>b.reg

)

for /f skip=2 delims=[ %%m in ('find /i \run\ a.reg') do (

echo ^[^-%%m >>b.reg

)

regedit /s b.reg

reg export hklm\%key% a.reg /nt4>nul

echo regedit4 >b.reg

echo [hkey_local_machine\%key%] >>b.reg

for /f skip=2 eol=[ tokens=1,2 delims== %%a in (a.reg) do (

findstr /i %%a tem.txt>nul||echo %%a=- >>b.reg

)

for /f skip=2 delims=[ %%m in ('find /i \run\ a.reg') do (

echo ^[^-%%m >>b.reg

)

regedit /s b.reg

del /q a.reg

del /q b.reg

del tem.txt

echo 已经优化好

echo ======================================

echo == ==

echo ======================================

echo 清理部分系统垃圾

del /f /q %systemdrive%\*.tmp>nul 2>nul

del /f /q %systemdrive%\*._mp>nul 2>nul

del /f /q %systemdrive%\*.log>nul 2>nul

del /f /q %systemdrive%\*.gid>nul 2>nul

del /f /q %systemdrive%\*.chk>nul 2>nul

del /f /q %systemdrive%\*.old>nul 2>nul

del /f /q %windir%\*.bak>nul 2>nul

del /f /q %windir%\*.tmp>nul 2>nul

del /f /q %windir%\prefetch\*.*>nul 2>nul

del /f /s /q %systemdrive%\recycled\*.*>nul 2>nul

del /f /q %allusersprofile%\documents\drwatson\*.*>nul 2>nul

del /f /q %userprofile%\cookies\*.txt>nul 2>nul

del /f /q /s %temp%\*.*>nul 2>nul

del /f /q /s %systemroot%\prefetch\*.*>nul 2>nul

del /f /q %userprofile%\recent\*.*>nul 2>nul

del /f /q %userprofile%\application data\microsoft\office\recent\*.lnk>nul 2>nul

del /f /q /s %userprofile%\local settings\temp\*.*>nul 2>nul

rd /s /q %windir%\temp & md %windir%\temp>nul 2>nul

if not exist %systemroot%\minidump\nul del /f /q /s %systemroot%\minidump\*.*>nul 2>nul

del /f /s /q %userprofile%\local settings\temporary internet files\*.*>nul 2>nul

echo 已经清理了

mshta vbscript:msgbox(everything done!!,,完成信息)(window.close)

taskkill /f /im cmd.exe

中国足彩网信息请查看脚本栏目
易贤网手机网站地址:开机启动项清理代码bat版
由于各方面情况的不断调整与变化,易贤网提供的所有考试信息和咨询回复仅供参考,敬请考生以权威部门公布的正式信息和咨询为准!
关于我们 | 联系我们 | 人才招聘 | 网站声明 | 网站帮助 | 非正式的简要咨询 | 简要咨询须知 | 加入群交流 | 手机站点 | 投诉建议
工业和信息化部备案号:滇ICP备2023014141号-1 足球游戏_中国足彩网¥体育资讯$ 滇公网安备53010202001879号 人力资源服务许可证:(云)人服证字(2023)第0102001523号
云南网警备案专用图标
联系电话:0871-65317125(9:00—18:00) 获取招聘考试信息及咨询关注公众号:hfpxwx
咨询QQ:526150442(9:00—18:00)版权所有:易贤网
云南网警报警专用图标