开机启动项清理代码bat版
来源: 阅读:777 次 日期:2016-06-17 10:10:32
温馨提示: 小编为您整理了“开机启动项清理代码bat版”,方便广大网友查阅!

代码如下:

@echooff&setlocalenabledelayedexpansion

modeconcols=61lines=25&colorf5

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

ifexisttem.txtdel/f/qtem.txt

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

echo>>tem.txtexplorer.exe

echo>>tem.txtsystemidleprocess

echo>>tem.txtsystem

echo>>tem.txtsmss.exe

echo>>tem.txtcsrss.exe

echo>>tem.txtwinlogon.exe

echo>>tem.txtservices.exe

echo>>tem.txttheworld.exe

echo>>tem.txtlsass.exe

echo>>tem.txtsvchost.exe

echo>>tem.txtspoolsv.exe

echo>>tem.txtalg.exe

echo>>tem.txtctfmon.exe

echo>>tem.txtekrn.exe

echo>>tem.txtwdfmgr.exe

echo>>tem.txt360tray.exe

echo>>tem.txtegui.exe

echo>>tem.txtwmiprvse.exe

echo>>tem.txtqq.exe

echo>>tem.txtcmd.exe

echo>>tem.txtiexplore.exe

echo>>tem.txttxplatform.exe

echo>>tem.txttasklist.exe

echo>>tem.txtconime.exe

echo>>tem.txtsafeboxtray.exe

echo>>tem.txtthunder5.exe

echo>>tem.txttudouva.exe

for/feol=tokens=1,2delims=,%%iin('tasklist/nh/focsv')do(

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

iferrorlevel1(

taskkill/f/pid%%j1>nul2>nul

)

)

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

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

echo====

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

echo优化开机启动项

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

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

for/fdelims=\%%jin('fsutilfsinfodrives^|find/v')do(

del/f/q%%j\*.inf>nul2>nul&del/f/q/ah%%j\*.exe2>nul

)

echo>>tem.txtegui

echo>>tem.txtessact

echo>>tem.txtctfmon.exe

setkey=software\microsoft\windows\currentversion\run

regexporthkcu\%key%a.reg/nt4>nul

echoregedit4>b.reg

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

for/fskip=2eol=[tokens=1,2delims==%%ain(a.reg)do(

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

)

for/fskip=2delims=[%%min('find/i\run\a.reg')do(

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

)

regedit/sb.reg

regexporthklm\%key%a.reg/nt4>nul

echoregedit4>b.reg

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

for/fskip=2eol=[tokens=1,2delims==%%ain(a.reg)do(

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

)

for/fskip=2delims=[%%min('find/i\run\a.reg')do(

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

)

regedit/sb.reg

del/qa.reg

del/qb.reg

deltem.txt

echo已经优化好

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

echo====

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

echo清理部分系统垃圾

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

del/f/q%userprofile%\applicationdata\microsoft\office\recent\*.lnk>nul2>nul

del/f/q/s%userprofile%\localsettings\temp\*.*>nul2>nul

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

ifnotexist%systemroot%\minidump\nuldel/f/q/s%systemroot%\minidump\*.*>nul2>nul

del/f/s/q%userprofile%\localsettings\temporaryinternetfiles\*.*>nul2>nul

echo已经清理了

mshtavbscript:msgbox(everythingdone!!,,完成信息)(window.close)

taskkill/f/imcmd.exe

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