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 10 Pro (x64)

C:\Windows\system32>taskkill /?

TASKKILL [/S system [/U username [/P [password]]]]
         { [/FI filter] [/PID processid | /IM imagename] } [/T] [/F]

    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.

    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
    MODULES       eq, ne                    DLL name
    SERVICES      eq, ne                    Service name
    WINDOWTITLE   eq, ne                    Window title

    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.

    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 /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 / Windows 10 Pro 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

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 10 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

 Kill process with cmd

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar help and support threads
Thread Forum
"Error opening process" message in Process Explorer
Hi Everyone I recently did a System Restore on a Windows 7 Pro 64 bit system to correct a strange problem I was having with IE. It seems to have solved the problem, but now Process Explorer is displaying the messages in the screen shot below, and I'm not sure why. The computer is functioning...
How do I kill a process that cannot be killed in the usual way?
Have encountered the below issue 3 times already. I launch a program - from Windows 7 startup panel The program does not show up. I try again and even a 3rd time. Nothing happens. Looking in the taskmanager first tab the program is not listed there Under processes it is indeed listed,...
Performance & Maintenance
open explorer, starts new process, close it, process remains active
Hi, I've got a quicklaunch shortcut to: %windir%\explorer.exe shell:::{323CA680-C24D-4099-B94D-446DD2D7249E} That takes me straight to my explorer favourites. What I notice is that when I launch that, I get a new explorer.exe thread appear in the task manager. When I close it though, that...
General Discussion
Windows 7 + Process Explorer + Patch: [Opening error process]
Hi fooks, I hope you all can read this, i'm from Belgium so my Englsich is not as good as it might be. I have bought last year a little notebook with Windows 7 Home Premium on it. On this machine i am the Administrator, and there are no other people on that, or guestaccounts made. On...
Installation & Setup
Make 'close window' button kill the process?
One of the forever most annoying things about Windows, is that if a program stalls and you want to kill it, clicking the 'x' button for closing the window, actually does nothing. Is there a way to make this button forcibly kill the process, without having the wait ages for the "This program...
General Discussion
connection by the system process and killed process
I have a few apps running, incl. Firefox, Outlook. I took down their PID and then exit those programs. I run the following command: netstat -a -o -b -p tcp It will list many connections like below TCP xx.xx.xx.xx:http ESTABLISHED 4184 TCP ...
Network & Sharing

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 00:12.

Twitter Facebook Google+

Windows 7 Forums

Seven Forums Android App Seven Forums IOS App