Kill process with cmd

cclloyd9785

Master of Technology
Power User
Local time
11:28 AM
Messages
662
Location
Boston, MA
What would be the command to kill a process like explorer.exe or wininit.exe through cmd?
 

My Computer

Computer Manufacturer/Model Number
Toshiba Satellite L505D-S9565
OS
Windows 7 Home Premium x64, Mac OS X 10.6.2 x64
CPU
AMD Athlon X2 Dual-Core 2.1 GHz
Motherboard
Toshiba Built-In with Insyde H20 BIOS 1.40
Memory
4 GB DDR2 800 MHz
Graphics Card(s)
ATI Radeon HD Mobility 3100 Graphics 256MB to 1468 MB Shared
Sound Card
Realtek Mobile ALC272 HD Audio
Monitor(s) Displays
15.6" TFT LCD with TruBrite, Samsung 1080p HDTV
Screen Resolution
1366x768, 1920x1080
Hard Drives
❶:Main: Toshiba 250 GB SATA 5400 RPM
PSU
N/A
Case
N/A
Cooling
Built-in/Open window in winter :P
Keyboard
Built-in
Mouse
Build-in Symantics SmartTouch Pad
Internet Speed
55 MB/sec Down, 9 MB/sec Up
Other Info
❷:Backup: Seagate FreeAgent Desk USB 2.0 5400 RPM
❸:Media: Toshiba 640 GB USB 2.0 5400 RPM Portable Edition
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 Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Alienware Aurora ALX R4
OS
Windows 10 Pro (x64)
CPU
Intel Core i7-3930K (3.2GHz - 4.5GHz)
Motherboard
Alienware Aurora-R4 x79
Memory
4x Samsung 4GB PC3-12800 DDR3 (16GB 1600MHz)
Graphics Card(s)
Nvidia Geforce GTX 690
Sound Card
SteelSeries Siberia Elite
Monitor(s) Displays
Dell UltraSharp U3011
Screen Resolution
2560x1600
Hard Drives
Samsung 850 Pro 256 GB, Seagate 1TB Desktop Hybrid HDD, 2x Western Digital 4TB Green HDD
PSU
875W Some Dell PSU <.<
Case
Alienware Aurora ALX
Cooling
Custom Liquid Cooling (EK CPU & GPU blocks) dual EK 480RAD
Keyboard
Logitech G710+ Mechanical
Mouse
Logitech G700s
Internet Speed
Verizon Fios (50 mbps average)
Other Info
Server: Intel NUC D54250WYK: i5-4250U, 16GB, 256 GB mSATA, Windows Server 2012 R2

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Build
OS
Windows 10 Pro x64
CPU
Intel Core i5 4440 @Stock
Motherboard
Gigabyte Z97 D3H
Memory
4 x 4GB HyperX Fury DDR3
Graphics Card(s)
Gigabyte GTX 1050Ti O4G
Sound Card
Integrated
Monitor(s) Displays
Dell P2417H
Screen Resolution
1920 x 1080
Hard Drives
Samsung EVO 850 120GB / Toshiba DT01ACA050 1TB 7200prm 32MB
PSU
Riotoro Onyx 750W
Case
NZXT H500 Black-Red
Cooling
Stock CPU + NZXT 120mm + 2x120mm red fans
Keyboard
Modecom Volcano Lanparty
Mouse
Asus ROG Gladius / DeepCool E-Pad Plus
Internet Speed
DOCSIS 50/3 Mbit
Browser
Google Chrome
Other Info
Asus K55VJ(i5 3210M, GT635M / 2GB, 8GB DDR3, 500GB HDD)
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 Computer

Computer Manufacturer/Model Number
Toshiba Satellite L505D-S9565
OS
Windows 7 Home Premium x64, Mac OS X 10.6.2 x64
CPU
AMD Athlon X2 Dual-Core 2.1 GHz
Motherboard
Toshiba Built-In with Insyde H20 BIOS 1.40
Memory
4 GB DDR2 800 MHz
Graphics Card(s)
ATI Radeon HD Mobility 3100 Graphics 256MB to 1468 MB Shared
Sound Card
Realtek Mobile ALC272 HD Audio
Monitor(s) Displays
15.6" TFT LCD with TruBrite, Samsung 1080p HDTV
Screen Resolution
1366x768, 1920x1080
Hard Drives
❶:Main: Toshiba 250 GB SATA 5400 RPM
PSU
N/A
Case
N/A
Cooling
Built-in/Open window in winter :P
Keyboard
Built-in
Mouse
Build-in Symantics SmartTouch Pad
Internet Speed
55 MB/sec Down, 9 MB/sec Up
Other Info
❷:Backup: Seagate FreeAgent Desk USB 2.0 5400 RPM
❸:Media: Toshiba 640 GB USB 2.0 5400 RPM Portable Edition
what specific process are you trying to kill.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Own build
OS
Windows 7x64 Home Premium SP1
CPU
Intel i7 2600k
Motherboard
ASUS P8Z68 Deluxe
Memory
G.Skill Ripjaws (DDR3-1600) 2x4GB
Graphics Card(s)
Nvidia GeForce GTS 450; Intel HD Graphics 3000(GT2+)
Monitor(s) Displays
Dell Ultrasharp IPS panel U2311H, Samsung SyncMaster P2350
Screen Resolution
1920x1080
Hard Drives
Samsung 850 Pro SSD 256GB, Samsung SSD 840 120GB, Seagates 1TB Barracuda ST31000528AS x2
PSU
Seasonic M12II 520W
Case
Lian Li Lancool PC-K60
Cooling
Case: 1x120mm, 3x140mm CPU: Hyper 212+
Keyboard
Logitech MK520 (wireless)
Mouse
Logitech MK520
Internet Speed
6-7 Mbps
Antivirus
Norton Security Premium, Malwarebytes on 2 (MSE on 3rd PC)
Browser
FireFox
Other Info
Audio: Logitech Z523 2.1
explorer.exe and wininit.exe, separately.
 

My Computer

Computer Manufacturer/Model Number
Toshiba Satellite L505D-S9565
OS
Windows 7 Home Premium x64, Mac OS X 10.6.2 x64
CPU
AMD Athlon X2 Dual-Core 2.1 GHz
Motherboard
Toshiba Built-In with Insyde H20 BIOS 1.40
Memory
4 GB DDR2 800 MHz
Graphics Card(s)
ATI Radeon HD Mobility 3100 Graphics 256MB to 1468 MB Shared
Sound Card
Realtek Mobile ALC272 HD Audio
Monitor(s) Displays
15.6" TFT LCD with TruBrite, Samsung 1080p HDTV
Screen Resolution
1366x768, 1920x1080
Hard Drives
❶:Main: Toshiba 250 GB SATA 5400 RPM
PSU
N/A
Case
N/A
Cooling
Built-in/Open window in winter :P
Keyboard
Built-in
Mouse
Build-in Symantics SmartTouch Pad
Internet Speed
55 MB/sec Down, 9 MB/sec Up
Other Info
❷:Backup: Seagate FreeAgent Desk USB 2.0 5400 RPM
❸:Media: Toshiba 640 GB USB 2.0 5400 RPM Portable Edition
You are trying to kill wininit?! Are you trying to BSOD the computer?
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Alienware Aurora ALX R4
OS
Windows 10 Pro (x64)
CPU
Intel Core i7-3930K (3.2GHz - 4.5GHz)
Motherboard
Alienware Aurora-R4 x79
Memory
4x Samsung 4GB PC3-12800 DDR3 (16GB 1600MHz)
Graphics Card(s)
Nvidia Geforce GTX 690
Sound Card
SteelSeries Siberia Elite
Monitor(s) Displays
Dell UltraSharp U3011
Screen Resolution
2560x1600
Hard Drives
Samsung 850 Pro 256 GB, Seagate 1TB Desktop Hybrid HDD, 2x Western Digital 4TB Green HDD
PSU
875W Some Dell PSU <.<
Case
Alienware Aurora ALX
Cooling
Custom Liquid Cooling (EK CPU & GPU blocks) dual EK 480RAD
Keyboard
Logitech G710+ Mechanical
Mouse
Logitech G700s
Internet Speed
Verizon Fios (50 mbps average)
Other Info
Server: Intel NUC D54250WYK: i5-4250U, 16GB, 256 GB mSATA, Windows Server 2012 R2
Well... not my computer :P
 

My Computer

Computer Manufacturer/Model Number
Toshiba Satellite L505D-S9565
OS
Windows 7 Home Premium x64, Mac OS X 10.6.2 x64
CPU
AMD Athlon X2 Dual-Core 2.1 GHz
Motherboard
Toshiba Built-In with Insyde H20 BIOS 1.40
Memory
4 GB DDR2 800 MHz
Graphics Card(s)
ATI Radeon HD Mobility 3100 Graphics 256MB to 1468 MB Shared
Sound Card
Realtek Mobile ALC272 HD Audio
Monitor(s) Displays
15.6" TFT LCD with TruBrite, Samsung 1080p HDTV
Screen Resolution
1366x768, 1920x1080
Hard Drives
❶:Main: Toshiba 250 GB SATA 5400 RPM
PSU
N/A
Case
N/A
Cooling
Built-in/Open window in winter :P
Keyboard
Built-in
Mouse
Build-in Symantics SmartTouch Pad
Internet Speed
55 MB/sec Down, 9 MB/sec Up
Other Info
❷:Backup: Seagate FreeAgent Desk USB 2.0 5400 RPM
❸:Media: Toshiba 640 GB USB 2.0 5400 RPM Portable Edition
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 Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom-built
OS
Windows 7 Professional SP1 32-bit
CPU
Intel Core 2 Duo E6600 2.4GHz
Motherboard
Asus PL5D2
Memory
4GB DDR2-667 (4x1GB in dual-channel config)
Graphics Card(s)
nVidia GeForce 9800 GT
Sound Card
Creative X-Fi XtremeMusic
Monitor(s) Displays
Acer P236H
Screen Resolution
1920x1200 (DVI)
Hard Drives
OCZ SSD Vertex Plus 60GB SATA (Firmware 3.55), 64MB cache
Hitachi HD321KJ SATA, 320GB, 7200rpm, 16MB cache
PSU
Antec TruePower 2.0
Case
Cooler Master Centurion
Cooling
Too many fans
Keyboard
Standard
Mouse
Microsoft wireless optical mouse
Internet Speed
AT&T U-verse (18mbit/sec)
Antivirus
Microsoft Security Essentials
Browser
Firefox
Other Info
Other devices:
Compaq CQ-60 laptop
Google Nexus 7 (2012) tablet
Nvidia SHIELD tablet (US/LTE)
Hardkernel ODROID-XU single-board computer (Samsung Exynos 5420)
Yes, but it did the same thing for explorer.exe and even chrome.exe
 

My Computer

Computer Manufacturer/Model Number
Toshiba Satellite L505D-S9565
OS
Windows 7 Home Premium x64, Mac OS X 10.6.2 x64
CPU
AMD Athlon X2 Dual-Core 2.1 GHz
Motherboard
Toshiba Built-In with Insyde H20 BIOS 1.40
Memory
4 GB DDR2 800 MHz
Graphics Card(s)
ATI Radeon HD Mobility 3100 Graphics 256MB to 1468 MB Shared
Sound Card
Realtek Mobile ALC272 HD Audio
Monitor(s) Displays
15.6" TFT LCD with TruBrite, Samsung 1080p HDTV
Screen Resolution
1366x768, 1920x1080
Hard Drives
❶:Main: Toshiba 250 GB SATA 5400 RPM
PSU
N/A
Case
N/A
Cooling
Built-in/Open window in winter :P
Keyboard
Built-in
Mouse
Build-in Symantics SmartTouch Pad
Internet Speed
55 MB/sec Down, 9 MB/sec Up
Other Info
❷:Backup: Seagate FreeAgent Desk USB 2.0 5400 RPM
❸:Media: Toshiba 640 GB USB 2.0 5400 RPM Portable Edition
You still haven't given a reason why you're doing this. explorer.exe is the Windows shell; if you kill that process you lose the taskbar, notifications and all desktop icons. And what's wrong with exiting Chrome by closing its window like any other program?

I just don't see the point in this.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom-built
OS
Windows 7 Professional SP1 32-bit
CPU
Intel Core 2 Duo E6600 2.4GHz
Motherboard
Asus PL5D2
Memory
4GB DDR2-667 (4x1GB in dual-channel config)
Graphics Card(s)
nVidia GeForce 9800 GT
Sound Card
Creative X-Fi XtremeMusic
Monitor(s) Displays
Acer P236H
Screen Resolution
1920x1200 (DVI)
Hard Drives
OCZ SSD Vertex Plus 60GB SATA (Firmware 3.55), 64MB cache
Hitachi HD321KJ SATA, 320GB, 7200rpm, 16MB cache
PSU
Antec TruePower 2.0
Case
Cooler Master Centurion
Cooling
Too many fans
Keyboard
Standard
Mouse
Microsoft wireless optical mouse
Internet Speed
AT&T U-verse (18mbit/sec)
Antivirus
Microsoft Security Essentials
Browser
Firefox
Other Info
Other devices:
Compaq CQ-60 laptop
Google Nexus 7 (2012) tablet
Nvidia SHIELD tablet (US/LTE)
Hardkernel ODROID-XU single-board computer (Samsung Exynos 5420)
I've had the need to end the explorer.exe process on occasion because of something using it then restart it again. However, I've never personally seen the need to do it at the command line level.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Own build
OS
Windows 7x64 Home Premium SP1
CPU
Intel i7 2600k
Motherboard
ASUS P8Z68 Deluxe
Memory
G.Skill Ripjaws (DDR3-1600) 2x4GB
Graphics Card(s)
Nvidia GeForce GTS 450; Intel HD Graphics 3000(GT2+)
Monitor(s) Displays
Dell Ultrasharp IPS panel U2311H, Samsung SyncMaster P2350
Screen Resolution
1920x1080
Hard Drives
Samsung 850 Pro SSD 256GB, Samsung SSD 840 120GB, Seagates 1TB Barracuda ST31000528AS x2
PSU
Seasonic M12II 520W
Case
Lian Li Lancool PC-K60
Cooling
Case: 1x120mm, 3x140mm CPU: Hyper 212+
Keyboard
Logitech MK520 (wireless)
Mouse
Logitech MK520
Internet Speed
6-7 Mbps
Antivirus
Norton Security Premium, Malwarebytes on 2 (MSE on 3rd PC)
Browser
FireFox
Other Info
Audio: Logitech Z523 2.1
I actually learned a neat trick to end explorer.exe safely instead of killing it from Task Manager:

Click on the start orb, then hold down CTRL and SHIFT and rightclick in an empty space inside the Start menu. The context menu (which usually just says Properties) will then include the option Exit Explorer. :)
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom-built
OS
Windows 7 Professional SP1 32-bit
CPU
Intel Core 2 Duo E6600 2.4GHz
Motherboard
Asus PL5D2
Memory
4GB DDR2-667 (4x1GB in dual-channel config)
Graphics Card(s)
nVidia GeForce 9800 GT
Sound Card
Creative X-Fi XtremeMusic
Monitor(s) Displays
Acer P236H
Screen Resolution
1920x1200 (DVI)
Hard Drives
OCZ SSD Vertex Plus 60GB SATA (Firmware 3.55), 64MB cache
Hitachi HD321KJ SATA, 320GB, 7200rpm, 16MB cache
PSU
Antec TruePower 2.0
Case
Cooler Master Centurion
Cooling
Too many fans
Keyboard
Standard
Mouse
Microsoft wireless optical mouse
Internet Speed
AT&T U-verse (18mbit/sec)
Antivirus
Microsoft Security Essentials
Browser
Firefox
Other Info
Other devices:
Compaq CQ-60 laptop
Google Nexus 7 (2012) tablet
Nvidia SHIELD tablet (US/LTE)
Hardkernel ODROID-XU single-board computer (Samsung Exynos 5420)

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Build
OS
Windows 10 Pro x64
CPU
Intel Core i5 4440 @Stock
Motherboard
Gigabyte Z97 D3H
Memory
4 x 4GB HyperX Fury DDR3
Graphics Card(s)
Gigabyte GTX 1050Ti O4G
Sound Card
Integrated
Monitor(s) Displays
Dell P2417H
Screen Resolution
1920 x 1080
Hard Drives
Samsung EVO 850 120GB / Toshiba DT01ACA050 1TB 7200prm 32MB
PSU
Riotoro Onyx 750W
Case
NZXT H500 Black-Red
Cooling
Stock CPU + NZXT 120mm + 2x120mm red fans
Keyboard
Modecom Volcano Lanparty
Mouse
Asus ROG Gladius / DeepCool E-Pad Plus
Internet Speed
DOCSIS 50/3 Mbit
Browser
Google Chrome
Other Info
Asus K55VJ(i5 3210M, GT635M / 2GB, 8GB DDR3, 500GB HDD)
I actually learned a neat trick to end explorer.exe safely instead of killing it from Task Manager:

Click on the start orb, then hold down CTRL and SHIFT and rightclick in an empty space inside the Start menu. The context menu (which usually just says Properties) will then include the option Exit Explorer. :)
http://www.sevenforums.com/tutorials/3937-explorer-exe-kill-all-processes-once.html :)
Not ALL processes just kill explorer instances.
The ctrl+shift+esc is the short way to task manager. Personally I find I'm in task manager when I find it's explorer I temporarily need to kill then start again.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Own build
OS
Windows 7x64 Home Premium SP1
CPU
Intel i7 2600k
Motherboard
ASUS P8Z68 Deluxe
Memory
G.Skill Ripjaws (DDR3-1600) 2x4GB
Graphics Card(s)
Nvidia GeForce GTS 450; Intel HD Graphics 3000(GT2+)
Monitor(s) Displays
Dell Ultrasharp IPS panel U2311H, Samsung SyncMaster P2350
Screen Resolution
1920x1080
Hard Drives
Samsung 850 Pro SSD 256GB, Samsung SSD 840 120GB, Seagates 1TB Barracuda ST31000528AS x2
PSU
Seasonic M12II 520W
Case
Lian Li Lancool PC-K60
Cooling
Case: 1x120mm, 3x140mm CPU: Hyper 212+
Keyboard
Logitech MK520 (wireless)
Mouse
Logitech MK520
Internet Speed
6-7 Mbps
Antivirus
Norton Security Premium, Malwarebytes on 2 (MSE on 3rd PC)
Browser
FireFox
Other Info
Audio: Logitech Z523 2.1
Back
Top