如何使用bat清理開機啟動項-創(chuàng)新互聯(lián)

這篇文章將為大家詳細講解有關如何使用bat清理開機啟動項,小編覺得挺實用的,因此分享給大家做個參考,希望大家閱讀完這篇文章后可以有所收獲。

創(chuàng)新互聯(lián)-專業(yè)網站定制、快速模板網站建設、高性價比東平網站開發(fā)、企業(yè)建站全套包干低至880元,成熟完善的模板庫,直接使用。一站式東平網站制作公司更省心,省錢,快速模板網站建設找我們,業(yè)務覆蓋東平地區(qū)。費用合理售后完善,10年實體公司更值得信賴。

代碼如下:

@echo off&setlocal enabledelayedexpansion
mode con cols=61 lines=25&color f5
mshta vbscript:msgbox("在運行程序前,請確認所有編輯資料已經保存",,"自制優(yōu)化系統(tǒng)")(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 優(yōu)化開機啟動項
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 已經優(yōu)化好
echo ======================================
echo ==                                  ==
echo ======================================
echo 清理部分系統(tǒng)垃圾
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清理開機啟動項”這篇文章就分享到這里了,希望以上內容可以對大家有一定的幫助,使各位可以學到更多知識,如果覺得文章不錯,請把它分享出去讓更多的人看到。

分享名稱:如何使用bat清理開機啟動項-創(chuàng)新互聯(lián)
鏈接分享:http://muchs.cn/article38/coedpp.html

成都網站建設公司_創(chuàng)新互聯(lián),為您提供外貿建站、搜索引擎優(yōu)化、網站排名定制網站、移動網站建設、標簽優(yōu)化

廣告

聲明:本網站發(fā)布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)

成都seo排名網站優(yōu)化