Софт-Архив

Kill Process Windows Cmd img-1

Kill Process Windows Cmd

Рейтинг: 4.0/5.0 (1860 проголосовавших)

Категория: Windows: Расширения

Описание

TASKKILL - завершение процесса в Windows

Команда TASKKILL - завершить процесс.

Команда TASKKILL используется для завершения процессов по идентификаторам или именам исполняемых файлов на локальной или удаленной системе. Используется в операционных системах Windows XP и старше.

Формат командной строки:

TASKKILL [/S [/U [/P [ ]]]] < [/FI ] [/PID | /IM ] > [/T] [/F] Описание параметров командной строки :

Примеры использования:

taskkill /? > taskkill.txt - выдать справку по использованию команды в текстовый файл taskill.txt

TASKKILL /IM notepad.exe - завершить процесс, исполняемым образом которого является notepad.exe. Если таких процессов более одного - то будут завершены все.

taskkill /PID 1234 /T - завершить процесс с идентификатором 1234 и все его дочерние процессы ( /T ). Одной командой можно завершить несколько процессов, задавая их PID - taskkill /PID 1234 /PID 2345 /PID 800. Для определения идентификатора процессов используется команда tasklist :

tasklist | find /I "notepad" - отобразить информацию для процессов с именем, содержащим строку notepad. В ответ будет выдано сообщение, например:

Где 824 и 3004 - это идентификаторы PID

TASKKILL /F /FI "PID ge 2000" /FI "WINDOWTITLE eq Arc*" - принудительно (/F) завершить процесс, идентификатор которого больше или равен 2000 и заголовок окна которого. начинается с текста Arc

TASKKILL /F /FI "USERNAME eq NT AUTHORITY\SYSTEM" /IM notepad.exe - принудительно завершить процесс, выполняющийся в контексте учетной записи NT AUTHORITY\SYSTEM и исполняемый файл которого имеет имя notepad.exe

TASKKILL /S 192.168.0.243 /U MyDomain\user /FI "USERNAME ne NT*" /IM * - завершить все процессы, выполняющиеся в контекстах учетных записей, не начинающихся со строки NT на компьютере с IP-адресом 192.168.0.243. При подключении к удаленной системе используется имя пользователя user в домене Mydomain. Пароль не задан и будет запрошен при выполнении команды.

TASKKILL /S SERVER /U Mydomain\User /P UserPass /FI "IMAGENAME eq note*" - завершить все процессы, имя исполняемого файла которых начинается со строки note на удаленном компьютере с именем SERVER.

При завершении процессов как локально, так и удаленно, результат выполнения команды TASKKILL зависит от прав пользователя, в контексте учетной записи которого выполняется команда.

Другие статьи, обзоры программ, новости

Как отобразить и завершить процесс в Windows

Как отобразить и завершить процесс в Windows. Cmd.exe

После длительного перерыва, с чем он был связан расскажу чуть ниже, продолжаю ведение блога и сегодня решил продолжить тему по командной строке Windows. Речь пойдёт всего о двух командах, первая позволит отобразить все процессы в cmd.exe, а вторая завершить нужный процесс из cmd.exe. А не вел я блог с 24 августа по 8 сентября по одной единственной причине!

Это связанно с покупкой первой машины. Решил все-таки купить! Выбор упал на ВАЗ 2105. Сама тачка в хорошем состоянии, на ходу, но все-токи был нужен не большой косметический ремонт морды и не много с проводкой повозится пришлось…

Вот и пришлось сменить клавиатуру и мышь на гаечные ключи. А вместо привычных мне сайтов, читал только сайты посвящённые авто тематике!

В общем пост о своей машине я думаю ещё напишу. А теперь стоит вернуться к теме.

Много слов писать я не буду, так как не чего особенного в данной теме нет. Просто, коротко расскажу о двух командах «tasklist » и «taskkill » которые могут пригодится в повседневной работе за компьютером. В подробности вдаваться я не буду…

Как вывести все процессы в консоли.

Для этого дела предусмотрена команда «tasklist » запускаем cmd.exe и пишем данную команду.

Теперь список всех процессов запущенных в системе как на ладони, будет выведен в cmd.exe! Что Важно знать.

Это естественно «Имя образа » проще говоря имя процесса и так называемый PID – Это просто некое число, оно нам пригодится, когда пойдёт речь о команде «taskkill »

Имена всех запущенных процессов, мы успешно вывели в консоль, теперь посмотрим, как можно убить процесс через командную строку Windows.

Как завершить процесс через cmd.exe

Тут-то и понадобится команда «taskkill ». Пользоваться её в локальных условиях довольно просто. Посмотрим как.

У меня запущен процесс «Project1.exe» (Пустое приложение созданное в Delphi специально для этого поста)

После «/IM» пишем имя запущенного процесса, затем как обычно «Enter» и процесс будет убит.

Это был первый способ убить процесс. Рассмотрим и второй. Тут и понадобится нам тот самый «PID»

В моём случаи PID процесса «Project1.exe» такой 5764 У вас он естественно будет другой…

Формируем команду таким образом!

То есть, за место «/ im » как было в первом варианте, пишем уже «/ PID », а вместо имени процесса указываем сам номер.

Процесс также будет успешно завершён. Если Вам нужно завершить процесс принудительно, то используйте ключик «/ F ».

Теперь при необходимости можно быстро завершить процесс не используя диспетчер задач.

Kill Processes From The Command Prompt In Windows 7

Kill Processes From The Command Prompt In Windows 7

Advertisement

We all at one time or another have used the Task Manager to kill some particular process, no doubt the  task manager  offers a great way to manage processes but have you ever tried to kill multiple processes with the task manager? You can kill only one process at a time. Windows lets you manage processes from the command line, letting you kill multiple processes simultaneously. Windows 7 supports Tasklist and Taskkill commands to display all  running tasks and kill a set of active processes, respectively. In this post, we will let you know how to use these commands in both Windows 7.

Search the CMD utility from Start Search. Right-click it and select it Run as administrator from right-click context menu.

Once CMD utility is launched, run the tasklist command, it will show you a list of all the running processes.

Now you can kill any particular process by running the  Taskkill command. For example to kill Google Chrome, run the command as:

Taskkill /F /IM chrome.exe

where /F is used to kill the process forcefully. You can also kill any particular process by using it’s ID, the tasklist command displays the process ID’s as well (you can see the PID column in the screenshot). To kill any process using it’s ID, run the command as:

Kill Processes from Command Prompt

Kill Processes from Command Prompt

I'm sure you are familiar with the traditional way to kill or end a process in Windows using Task Manager. This method is effective but not nearly as fun as killing a process in Command Prompt. Additionally, killing processes in Command Prompt provides much more control and the ability to end multiple processes at once.

All of this is possible with the TaskKill command. First, let's cover the basics. You can kill a process by the process ID (PID) or by image name (EXE filename).

Open up an Administrative level Command Prompt and run tasklist to see all of the running processes:

In the example above you can see the image name and the PID for each process. If you want to kill the firefox process run:

The /f flag is kills the process forcefully. Failure to use the /F flag will result in nothing happening in some cases. One example is whenever I want to kill the explorer.exe process I have to use the /F flag or else the process just does not terminate.

If you have multiple instances of an image open such as multiple firefox.exe processes, running the taskkill /IM firefox.exe command will kill all instances. When you specify the PID only the specific instane of firefox will be terminated.

The real power of taskkill are the filtering options that allow you to use the following variables and operators.

Variables:

Operators:

  • eq (equals)
  • ne (not equal)
  • gt (greater than)
  • lt (less than)
  • ge (greater than or equal)
  • le (less than or equal)

"*" is the wildcard.

You can use the variables and operators with the /FI filtering flag. For example, let's say you want to end all processes that have a window title that starts with "Internet":

How about killing all processes running under the Steve account:

It is also possible to kill a process running on a remote computer with taskkill. Just run the following to kill notepad.exe on a remote computer called SteveDesktop:

To learn more about taskkill run it with the /? command just like any other Windows command.

Lusu s Blog: Kill Processes from Command Prompt

Tuesday, October 10, 2006 Kill Processes from Command Prompt

Yes, you can do that in Windows XP. The command for that is "tskill" (Terminal Services End Process Utility). For example:

tskill mspaint - will kill all Paint windows

tskill 1234 - will kill the specified process

The switch /v will output some extra information (verbose mode) like:

C:\WINDOWS\system32>tskill mspaint /v

End Process(208)

End Process(3656)

Now sky is the limit.

Note: it does not work in Windows 2000 and I didn't checked in Windows 2003. Let me know if it works on it and on Vista.

Update June, 24 2009

There is another tool as other have commented: taskkill. I have studied it a bit, and in turn it is much more complex than tskill. It can terminate processes on remote systems as well. Just type taskkill /? and read the help. To my example how to kill mspaint, here is the required syntax:

C:\>taskkill /im mspaint.exe

SUCCESS: The process "mspaint.exe" with PID 8836 has been terminated.

SUCCESS: The process "mspaint.exe" with PID 7612 has been terminated.

SUCCESS: The process "mspaint.exe" with PID 9036 has been terminated.

or if you know the process id:

C:\>taskkill /pid 7760

SUCCESS: The process with PID 7760 has been terminated.

For Windows 2000 users:

The techniques that I’ll be showing you involve using the TLIST and the KILL command. These commands are a part of the Windows Support Tools, which are not installed by default. Instead, these tools are kept on the Windows 2000 installation CD until you manually install them. Installing the support tools requires a little over 18 MB of hard disk space.To install the Windows Support Tools, log on as an administrator and insert your Windows 2000 installation CD. When you see the Windows 2000 splash screen, select the Browse This CD option. When the browse window opens, navigate through the CD’s directory to the \SUPPORT\TOOLS directory. Next, run the SETUP.EXE program.

With the support tools installed, without looking to Task Manager, a way of determining the process ID is by opening a Command Prompt window and entering the TLIST command.

The command line syntax of the KILL command is as follows:

As you’ve probably already figured out, the PID is the process ID and the pattern is the name of the process. Therefore, you can shut down a process by simply entering the KILL command followed by one of the two parameters. For example:

kill mspaint

The -F switch parameter will force a process to shut down. "Most of the time, you won’t want to use the -F switch. It’s intended for emergency use only." But that's the point right? To kill the process.

You can actually use the KILL command combined with the -F parameter to shut down critical systems services, thus resulting in the Blue Screen of Death. Coincidentally, several years ago I was at Microsoft’s TechEd conference, and one of the speakers had developed a virus based on the KILL -F command. He had used a common utility to create a service that issued the KILL -F command followed by the name of a critical system service. He then configured his service in a way that would cause it to load on startup. The result was that every time the machine would boot, it would instantly go to the Blue Screen of Death because he was killing a low level service. The only way that the speaker was able to undo the damage was to use ERD Commander to disable the virus service from outside of the operating system.

How Kill Windows Processes from Command Prompt Using Taskkill

[Quick Tip] Kill Windows Processes from the Command Prompt

Ads by Google

What do you do when a program does not respond or hangs indefinitely on your machine? Often, user hit the Ctrl + Alt + Del or Ctrl + Shift + Esc combination to launch task manager and put an end to end that process/application. However, I have faced situations when that fails to work too.

Under such circumstances, the Windows Command Prompt is the only option that I see. It is easy to kill a program from there and get things working again. Here’s the two-step method that I suggest.

Step 1: Open the Command Prompt by typing cmd in the Windows Start search and key in the command tasklist .

Instantly, you will see the list of processes that are currently running and active on your machine. Take note of the PID (Process ID) of the process that you want to kill.

Step 2: Follow up with another command taskkill /pid PID where, PID is the Process ID of the process you want to kill. For example if I wanted to kill firefox.exe, I would type taskkill /pid 976 .

For more options on taskkill type in taskkill /?. I know there are many more ways of doing the same and I would leave the comments section open for that discussion. Let us brainstorm.

Get Guiding Tech articles delivered to your inbox.

Kill processes using command prompt in Windows 7

Kill processes using command prompt in Windows 7

I was working on a startup script this morning and needed a way for the script to kill one process before starting up a new process.  I’ve used pskill.exe in the past, but wanted to find out if there were any built-in tools in Windows 7 before resorting to Sysinternals components.

It just so happens that Windows 7 comes with a program called taskkill.exe that does exactly what I need in a no muss, no fuss manner.

Here’s how to use this utility from the command line or from a script — there are several options available, but this is what I landed on:

  • The /IM flag tells taskkill that you want to kill all processes with an Image name of “javaw.exe”. 
  • The /F flag indicates that you want to force close the application rather than playing nice, for example bypassing any shutdown dialogs that may be shown by a GUI during a normal exit.

You can also use the process ID and kill processes on remote computers — type taskkill /? in a cmd window to see the complete list of options.

Credit: Tasklist and Taskkill

A Command line equivalent Task Manager utility

Kill Processes using Command Prompt in Windows 7

Thread: Kill Processes using Command Prompt in Windows 7 | 8 Kill Processes using Command Prompt in Windows 7 | 8

If your Task Manager gets stuck or unresponsive due to intensive apps and you are not able to kill the particular process. What do you do. You press ctrl-alt-delete to open up the Task Manager and find the culprit. But you can kill also multiple processes using command prompt in Windows 7.

Kill Processes using Command Prompt in Windows 7 | 8

For this we use the Tasklist and Taskview commands.

Open the Command Prompt in the Administrative privileges mode and run the Tasklist command, it will show you a list of all the running processes.

To views the processes, type Taskview and hit Enter.

To kill any particular process use the Taskkill command. For example to kill Chrome, run the command as:

Taskkill /IM chrome.exe /F

where /F is used to kill the process forcefully. You can also kill any particular process by using it’s ID, the tasklist command displays the process ID’s as well (you can see the PID column in the screenshot). To kill any process using it’s ID, run the command as:

Taskkill /PID 2704 /F

Now to kill multiple processes simultaneously, run the above command with the PID’s of all the processes followed by spaces

Taskkill /PID 2704 5472 4344 /F

That's it!

Last edited by knightrider™; 17th November 2009 at 11:25.