Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- set loop=top
- :top
- cls
- echo In a few seconds a list of processes will appear. Look for the one you want to close then type the name in.
- ping -n 5 localhost > nul
- tasklist
- echo Which process would you like to close?
- set /p process=
- echo Is the process a persistent process? (Meaning it opens itself when closed) Enter either Y or N.
- set /p persistent=
- if /i %persistent%==y set loop=loop
- :loop
- taskkill /im %process% /t /f > nul
- goto %loop%
Advertisement
Add Comment
Please, Sign In to add comment