這篇文章主要介紹了自制控制進程和控制開機啟動項批處理,需要的朋友可以參考下
自動結束強制智能結束.vbs
vbs主要起到運行bat的目地,傳參
代碼如下:
set wshshell=createobject(wscript.shell)
wshshell.run 針對性進程管理.bat
wscript.sleep 2000
for x=1 to 30
wscript.sleep 1000
wshshell.sendkeys {enter 3}
next
針對性進程管理.bat
代碼如下:
@echo off&setlocal enabledelayedexpansion
ping -n 3 127.0>nul
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 wscript.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 (
echo =============================================================
echo =============================================================
echo %%i位于以下路徑
wmic process where processid=%%j get executablepath|findstr /v /i executablepath
ntsd -c q -p %%j 1>nul 2>nul
ping -n 1 127.0>nul
tasklist|findstr /i %%i >nul
if errorlevel 1 (
echo %%i已經(jīng)完全成功結束
) else (
echo %%i未能完全結束,估計是個流氓程序
)
)
)
del tem.txt & echo 結束進程任務基本完成
taskkill /f /im wscript.exe
mshta vbscript:msgbox(我的任務完成了!請看詳細信息,,刷選進程)(window.close)
taskkill /f /im cmd.exe