Windows 7 Forums


Windows 7: Kill process with cmd

13 Oct 2011   #1

Windows 7 Home Premium x64, Mac OS X 10.6.2 x64
Boston, MA
 
 
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 7 x64 (SP1)
 
 

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
Macedonia
 
 

^^

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
Boston, MA
 
 

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 x 2
Australia
 
 

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
Boston, MA
 
 

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

Windows 7 x64 (SP1)
 
 

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
Boston, MA
 
 

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

Windows 7 Professional SP1 32-bit
Fantasyland
 
 

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
Boston, MA
 
 

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

 Kill process with cmd problems?



Thread Tools



Similar help and support threads for: Kill process with cmd
Thread Forum
How to kill DEP? System Security
Solved Make 'close window' button kill the process? General Discussion
Kill An Application But Not Process, From Batch File General Discussion
connection by the system process and killed process Network & Sharing
Did M$ just kill my key!? Can't activate... Windows Updates & Activation


All times are GMT -5. The time now is 08:43 AM.


Seven Forums Android App Seven Forums IOS App Follow us on Facebook

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
  

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