To kill a task using command prompt follow these steps:
List of running tasks will appear.
For example: To kill all internet explorer processes write:
- Click start button and write cmd
- Right click cmd.exe and click Run as administrator.
- Now write:
List of running tasks will appear.
- Now write:
For example: To kill all internet explorer processes write:
taskkill /F /IM iexplorer.exe
This will help you to kill one task at a time. If you want to kill all tasks then create a .bat file with following content:
@echo off
title Kill all running apps
cd c:windowsSystem32
for /f "skip=3 tokens=1" %%i in ('tasklist /FI "sessionname eq Console" ') do (
if not "%%i"=="svchost.exe" (
if not "%%i"=="explorer.exe" (
if not "%%i"=="cmd.exe" (
if not "%%i"=="tasklist.exe" (
if not "%%i"=="firefox.exe" (
echo %%i
taskkill /f /im "%%i"
)
)
)
)
)
)
pause
Now run the .bat file
This will help you to kill one task at a time. If you want to kill all tasks then create a .bat file with following content:
@echo off
title Kill all running apps
cd c:windowsSystem32
for /f "skip=3 tokens=1" %%i in ('tasklist /FI "sessionname eq Console" ') do (
if not "%%i"=="svchost.exe" (
if not "%%i"=="explorer.exe" (
if not "%%i"=="cmd.exe" (
if not "%%i"=="tasklist.exe" (
if not "%%i"=="firefox.exe" (
echo %%i
taskkill /f /im "%%i"
)
)
)
)
)
)
pause
Now run the .bat file
No comments:
Post a Comment