หน้าเว็บ

วันอังคารที่ 29 ธันวาคม พ.ศ. 2552

Howto kill process on window with command line.

Howto kill process on window with command line.

If you know the name of a process to kill, for example notepad.exe, use the following command from a command prompt to end it:

taskkill /IM notepad.exe

This will cause the program to terminate gracefully, asking for confirmation if there are unsaved changes. To forcefully kill the same process, add the /F option to the command line. Be careful with the /F option as it will terminate all matching processes without confirmation.

To kill a single instance of a process, specify its process id (PID). For example, if the desired process has a PID of 827, use the following command to kill it:

taskkill /PID 827

Using filters, a variety of different patterns can be used to specify the processes to kill. For example, the following filter syntax will forcefully kill all processes owned by the user Quinn:

taskkill /F /FI "USERNAME eq Quinn"

eq: equals ne: not equal
gt: greater than lt: less than
gt: greater than or equal le: less than or equal


Thanks : tech-recipes.com

ไม่มีความคิดเห็น: