how to end a process with cmd.
open cmd then cheak tasks in process.
C:\Users\sonu>tasklist
Image Name PID Session Name Session# Mem Usage
========================= ======== ================ =========== ============
System Idle Process 0 Services 0 24 K
System 4 Services 0 976 K
smss.exe 312 Services 0 752 K
csrss.exe 464 Services 0 3,036 K
wininit.exe 544 Services 0 4,016 K
csrss.exe 560 Console 1 25,808 K
services.exe 596 Services 0 7,928 K
winlogon.exe 636 Console 1 4,904 K
lsass.exe 648 Services 0 7,592 K
lsm.exe 656 Services 0 3,412 K
svchost.exe 780 Services 0 6,860 K
svchost.exe 888 Services 0 6,464 K
Ati2evxx.exe 936 Services 0 4,048 K
svchost.exe 1008 Services 0 14,936 K
svchost.exe 1056 Services 0 52,580 K
svchost.exe 1088 Services 0 25,968 K
audiodg.exe 1176 Services 0 22,600 K
svchost.exe 1240 Services 0 11,108 K
svchost.exe 1408 Services 0 12,040 K
Ati2evxx.exe 1452 Console 1 6,428 K
svchost.exe 1628 Services 0 12,616 K
AvastSvc.exe 1656 Services 0 16,000 K
spoolsv.exe 1788 Services 0 8,656 K
armsvc.exe 1992 Services 0 3,240 K
HWDeviceService.exe 2036 Services 0 4,676 K
taskhost.exe 1388 Console 1 7,536 K
dwm.exe 1952 Console 1 75,092 K
explorer.exe 2140 Console 1 71,904 K
ouc.exe 2152 Services 0 4,484 K
DCSHelper.exe 2208 Console 1 5,320 K
UAService.exe 2252 Services 0 1,956 K
WUDFHost.exe 2460 Services 0 5,212 K
AvastUI.exe 2684 Console 1 9,276 K
DCSHelper.exe 2916 Console 1 5,616 K
RtHDVCpl.exe 2940 Console 1 10,960 K
MOM.exe 2952 Console 1 4,196 K
idman.exe 3012 Console 1 13,600 K
Idea Net Setter.exe 3052 Console 1 42,524 K
CCC.exe 3352 Console 1 5,584 K
WmiPrvSE.exe 3496 Services 0 7,380 K
SearchIndexer.exe 3768 Services 0 10,572 K
svchost.exe 2896 Services 0 8,644 K
vlc.exe 4060 Console 1 29,444 K
chrome.exe 3388 Console 1 116,680 K
chrome.exe 2184 Console 1 48,320 K
chrome.exe 2532 Console 1 48,224 K
chrome.exe 908 Console 1 114,632 K
chrome.exe 2960 Console 1 65,336 K
sppsvc.exe 200 Services 0 4,452 K
svchost.exe 2468 Services 0 15,316 K
wmpnetwk.exe 1428 Services 0 5,424 K
chrome.exe 4368 Console 1 55,524 K
chrome.exe 5672 Console 1 84,780 K
chrome.exe 4324 Console 1 76,420 K
chrome.exe 4596 Console 1 78,188 K
chrome.exe 2544 Console 1 73,384 K
cmd.exe 3740 Console 1 2,824 K
conhost.exe 4936 Console 1 5,552 K
chrome.exe 5524 Console 1 69,708 K
notepad.exe 5116 Console 1 7,092 K
tasklist.exe 5876 Console 1 4,508 K
C:\Users\sonu>taskkill /?
TASKKILL [/S system [/U username [/P [password]]]]
{ [/FI filter] [/PID processid | /IM imagename] } [/T] [/F]
Description:
This tool is used to terminate tasks by process id (PID) or image name.
Parameter List:
/S system Specifies the remote system to connect to.
/U [domain\]user Specifies the user context under which the
command should execute.
/P [password] Specifies the password for the given user
context. Prompts for input if omitted.
/FI filter Applies a filter to select a set of tasks.
Allows "*" to be used. ex. imagename eq acme*
/PID processid Specifies the PID of the process to be terminated.
Use TaskList to get the PID.
/IM imagename Specifies the image name of the process
to be terminated. Wildcard '*' can be used
to specify all tasks or image names.
/T Terminates the specified process and any
child processes which were started by it.
/F Specifies to forcefully terminate the process(es).
/? Displays this help message.
Filters:
Filter Name Valid Operators Valid Value(s)
----------- --------------- -------------------------
STATUS eq, ne RUNNING |
NOT RESPONDING | UNKNOWN
IMAGENAME eq, ne Image name
PID eq, ne, gt, lt, ge, le PID value
SESSION eq, ne, gt, lt, ge, le Session number.
CPUTIME eq, ne, gt, lt, ge, le CPU time in the format
of hh:mm:ss.
hh - hours,
mm - minutes, ss - seconds
MEMUSAGE eq, ne, gt, lt, ge, le Memory usage in KB
USERNAME eq, ne User name in [domain\]user
format
MODULES eq, ne DLL name
SERVICES eq, ne Service name
WINDOWTITLE eq, ne Window title
NOTE
----
1) Wildcard '*' for /IM switch is accepted only when a filter is applied.
2) Termination of remote processes will always be done forcefully (/F).
3) "WINDOWTITLE" and "STATUS" filters are not considered when a remote
machine is specified.
Examples:
TASKKILL /IM notepad.exe
TASKKILL /PID 1230 /PID 1241 /PID 1253 /T
TASKKILL /F /IM cmd.exe /T
TASKKILL /F /FI "PID ge 1000" /FI "WINDOWTITLE ne untitle*"
TASKKILL /F /FI "USERNAME eq NT AUTHORITY\SYSTEM" /IM notepad.exe
TASKKILL /S system /U domain\username /FI "USERNAME ne NT*" /IM *
TASKKILL /S system /U username /P password /FI "IMAGENAME eq note*"
C:\Users\sonu>taskkill /im vlc.exe
SUCCESS: Sent termination signal to the process "vlc.exe" with PID 4060.
C:\Users\sonu>taskkill /im notepad.exe
SUCCESS: Sent termination signal to the process "notepad.exe" with PID 5116.
C:\Users\sonu>
how to end a process with cmd.
open cmd then cheak tasks in process.
C:\Users\sonu>tasklist
Image Name PID Session Name Session# Mem Usage
========================= ======== ================ =========== ============
System Idle Process 0 Services 0 24 K
System 4 Services 0 976 K
smss.exe 312 Services 0 752 K
csrss.exe 464 Services 0 3,036 K
wininit.exe 544 Services 0 4,016 K
csrss.exe 560 Console 1 25,808 K
services.exe 596 Services 0 7,928 K
winlogon.exe 636 Console 1 4,904 K
lsass.exe 648 Services 0 7,592 K
lsm.exe 656 Services 0 3,412 K
svchost.exe 780 Services 0 6,860 K
svchost.exe 888 Services 0 6,464 K
Ati2evxx.exe 936 Services 0 4,048 K
svchost.exe 1008 Services 0 14,936 K
svchost.exe 1056 Services 0 52,580 K
svchost.exe 1088 Services 0 25,968 K
audiodg.exe 1176 Services 0 22,600 K
svchost.exe 1240 Services 0 11,108 K
svchost.exe 1408 Services 0 12,040 K
Ati2evxx.exe 1452 Console 1 6,428 K
svchost.exe 1628 Services 0 12,616 K
AvastSvc.exe 1656 Services 0 16,000 K
spoolsv.exe 1788 Services 0 8,656 K
armsvc.exe 1992 Services 0 3,240 K
HWDeviceService.exe 2036 Services 0 4,676 K
taskhost.exe 1388 Console 1 7,536 K
dwm.exe 1952 Console 1 75,092 K
explorer.exe 2140 Console 1 71,904 K
ouc.exe 2152 Services 0 4,484 K
DCSHelper.exe 2208 Console 1 5,320 K
UAService.exe 2252 Services 0 1,956 K
WUDFHost.exe 2460 Services 0 5,212 K
AvastUI.exe 2684 Console 1 9,276 K
DCSHelper.exe 2916 Console 1 5,616 K
RtHDVCpl.exe 2940 Console 1 10,960 K
MOM.exe 2952 Console 1 4,196 K
idman.exe 3012 Console 1 13,600 K
Idea Net Setter.exe 3052 Console 1 42,524 K
CCC.exe 3352 Console 1 5,584 K
WmiPrvSE.exe 3496 Services 0 7,380 K
SearchIndexer.exe 3768 Services 0 10,572 K
svchost.exe 2896 Services 0 8,644 K
vlc.exe 4060 Console 1 29,444 K
chrome.exe 3388 Console 1 116,680 K
chrome.exe 2184 Console 1 48,320 K
chrome.exe 2532 Console 1 48,224 K
chrome.exe 908 Console 1 114,632 K
chrome.exe 2960 Console 1 65,336 K
sppsvc.exe 200 Services 0 4,452 K
svchost.exe 2468 Services 0 15,316 K
wmpnetwk.exe 1428 Services 0 5,424 K
chrome.exe 4368 Console 1 55,524 K
chrome.exe 5672 Console 1 84,780 K
chrome.exe 4324 Console 1 76,420 K
chrome.exe 4596 Console 1 78,188 K
chrome.exe 2544 Console 1 73,384 K
cmd.exe 3740 Console 1 2,824 K
conhost.exe 4936 Console 1 5,552 K
chrome.exe 5524 Console 1 69,708 K
notepad.exe 5116 Console 1 7,092 K
tasklist.exe 5876 Console 1 4,508 K
C:\Users\sonu>taskkill /?
TASKKILL [/S system [/U username [/P [password]]]]
{ [/FI filter] [/PID processid | /IM imagename] } [/T] [/F]
Description:
This tool is used to terminate tasks by process id (PID) or image name.
Parameter List:
/S system Specifies the remote system to connect to.
/U [domain\]user Specifies the user context under which the
command should execute.
/P [password] Specifies the password for the given user
context. Prompts for input if omitted.
/FI filter Applies a filter to select a set of tasks.
Allows "*" to be used. ex. imagename eq acme*
/PID processid Specifies the PID of the process to be terminated.
Use TaskList to get the PID.
/IM imagename Specifies the image name of the process
to be terminated. Wildcard '*' can be used
to specify all tasks or image names.
/T Terminates the specified process and any
child processes which were started by it.
/F Specifies to forcefully terminate the process(es).
/? Displays this help message.
Filters:
Filter Name Valid Operators Valid Value(s)
----------- --------------- -------------------------
STATUS eq, ne RUNNING |
NOT RESPONDING | UNKNOWN
IMAGENAME eq, ne Image name
PID eq, ne, gt, lt, ge, le PID value
SESSION eq, ne, gt, lt, ge, le Session number.
CPUTIME eq, ne, gt, lt, ge, le CPU time in the format
of hh:mm:ss.
hh - hours,
mm - minutes, ss - seconds
MEMUSAGE eq, ne, gt, lt, ge, le Memory usage in KB
USERNAME eq, ne User name in [domain\]user
format
MODULES eq, ne DLL name
SERVICES eq, ne Service name
WINDOWTITLE eq, ne Window title
NOTE
----
1) Wildcard '*' for /IM switch is accepted only when a filter is applied.
2) Termination of remote processes will always be done forcefully (/F).
3) "WINDOWTITLE" and "STATUS" filters are not considered when a remote
machine is specified.
Examples:
TASKKILL /IM notepad.exe
TASKKILL /PID 1230 /PID 1241 /PID 1253 /T
TASKKILL /F /IM cmd.exe /T
TASKKILL /F /FI "PID ge 1000" /FI "WINDOWTITLE ne untitle*"
TASKKILL /F /FI "USERNAME eq NT AUTHORITY\SYSTEM" /IM notepad.exe
TASKKILL /S system /U domain\username /FI "USERNAME ne NT*" /IM *
TASKKILL /S system /U username /P password /FI "IMAGENAME eq note*"
C:\Users\sonu>taskkill /im vlc.exe
SUCCESS: Sent termination signal to the process "vlc.exe" with PID 4060.
C:\Users\sonu>taskkill /im notepad.exe
SUCCESS: Sent termination signal to the process "notepad.exe" with PID 5116.
C:\Users\sonu>
15 comments: