Hey guys,
I just created a simple Taskmanager. It lists all active tasks and you are able to kill a task by writing it's name.
I hope that the source will be helpful for people who want to learn more about batch-programming.
Here's the code. Simply copy it into a textfile and save it as .bat
Enjoy! 🤝
I just created a simple Taskmanager. It lists all active tasks and you are able to kill a task by writing it's name.
I hope that the source will be helpful for people who want to learn more about batch-programming.
Here's the code. Simply copy it into a textfile and save it as .bat
Code
@echo off
set ver=1.0
title Taskmanager %ver%
cls
del tasklist.txt
del temp.txt
for /f %%x in ('tasklist /fi "status eq running"') do echo %%x >> tasklist.txt
sort tasklist.txt > temp.txt
cls
echo ------ Taskmanager %ver% ------
echo by 1337LnD for Hackforums.net
echo.
echo Runnings Tasks
type temp.txt
echo ------------------------------------------------------
echo The running tasks are listed above
echo.
echo If you want to kill a task, please write it's name
echo If you just want to quit, write "exit"
:Action
set /p taskkill="Taskname: "
:Kill
if "%taskkill%"=="exit" goto Exit
tasklist /fi "imagename eq %taskkill%" |find ":" > nul
if errorlevel = 1 (
taskkill /im %taskkill%
echo "%taskkill%" was sucessfully killed!
echo.
echo If you want to kill another task, please write it's name
echo Otherwise just write just "exit"
set /p taskkill="Taskname: "
goto Kill
) else (
if errorlevel = 0 echo Error! The Task "%taskkill%" was not found. Try again.
goto Action
)
:Exit
del tasklist.txt
del temp.txt
exitEnjoy! 🤝


![[Image: kwhosZp.png]](https://i.imgur.com/kwhosZp.png)