Este é um exemplo para matar alguns processos como "Taskhost.exe" "SSScheduler.exe" "taskeng.exe"
, assim você pode adicionar ou remover algum processo para ser eliminado neste lote; só você deve saber o nome do processo a ser morto.
@echo off
cls & color 0A
Mode con cols=60 lines=6
Title ProcessKiller by Hackoo 2016
:::::::::::::::::::::::::::::::::::::::::
:: Automatically check & get admin rights
:::::::::::::::::::::::::::::::::::::::::
REM --> Check for permissions
Reg query "HKU\S-1-5-19\Environment">nul 2>&1
REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
Echo.
ECHO **************************************
ECHO Running Admin shell... Please wait...
ECHO **************************************
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
set params = %*:"=""
echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
del "%temp%\getadmin.vbs"
exit /B
:gotAdmin
::::::::::::::::::::::::::::
::START
::::::::::::::::::::::::::::
set process="Taskhost.exe" "SSScheduler.exe" "taskeng.exe"
set Tmp=Tmp.txt
set LogFile=ProcessKillerLog.txt
If Exist %Tmp% Del %Tmp%
If Exist %LogFile% Del %LogFile%
For %%a in (%process%) Do Call :KillMyProcess %%a %Tmp%
Cmd /U /C Type %Tmp% > %LogFile%
If Exist %Tmp% Del %Tmp%
Start "" %LogFile%
Exit /b
:KillMyProcess
Cls
echo.
ECHO **************************************
Echo Trying to kill "%~1"
ECHO **************************************
(
Echo The Process : "%~1"
Taskkill /IM "%~1" /F /T
Echo =======================
)>>%2 2>&1