Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Kill process with cmd


13 Oct 2011   #1

Windows 7 Home Premium x64, Mac OS X 10.6.2 x64
 
 
Kill process with cmd

What would be the command to kill a process like explorer.exe or wininit.exe through cmd?


My System SpecsSystem Spec
.

13 Oct 2011   #2

Windows 8.1 Pro (x64)
 
 

Code:
C:\Windows\system32>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*"
My System SpecsSystem Spec
14 Oct 2011   #3

Windows 7 Ultimate SP1 x64
 
 

^^

Here's tutorial for that on SF .

Task Management
My System SpecsSystem Spec
.


14 Oct 2011   #4

Windows 7 Home Premium x64, Mac OS X 10.6.2 x64
 
 

When I use taskkill or tasklist to kill a process, it seems to bring up a dialog asking what to do with windows (shutdown, hibernate, logoff etc.) instead of killing the process. Tested with explorer.exe
My System SpecsSystem Spec
14 Oct 2011   #5
mjf

Windows 7x64 Home Premium SP1
 
 

what specific process are you trying to kill.
My System SpecsSystem Spec
14 Oct 2011   #6

Windows 7 Home Premium x64, Mac OS X 10.6.2 x64
 
 

explorer.exe and wininit.exe, separately.
My System SpecsSystem Spec
14 Oct 2011   #7

Windows 8.1 Pro (x64)
 
 

You are trying to kill wininit?! Are you trying to BSOD the computer?
My System SpecsSystem Spec
14 Oct 2011   #8

Windows 7 Home Premium x64, Mac OS X 10.6.2 x64
 
 

Well... not my computer :P
My System SpecsSystem Spec
25 Oct 2011   #9

Windows 7 Professional SP1 32-bit
 
 

OK, so why do you want to kill wininit.exe? It's a critical system process. If you're issuing a command to shut down this process I'm not surprised that you end up with a standby/shutdown/restart dialog...
My System SpecsSystem Spec
26 Oct 2011   #10

Windows 7 Home Premium x64, Mac OS X 10.6.2 x64
 
 

Yes, but it did the same thing for explorer.exe and even chrome.exe
My System SpecsSystem Spec
Reply

 Kill process with cmd




Thread Tools




Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 09:13 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33