Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CMD what does /im (taskkill)?

Tags:

cmd

taskkill

I just read the following command:

taskkill /f /im something.exe

I read that /f forces the task to close, but what does /im do?

like image 806
Hans Peter Avatar asked Jan 14 '14 17:01

Hans Peter


People also ask

What does IM do in taskkill?

For starters, you can kill a program by using the following command: taskkill /F /IM winword.exe. Note that you have to use . EXE when using the TASKKILL command. /F means to forcefully terminate the process forcefully. /IM means the image name, i.e. the process name.

What does taskkill do in CMD?

The taskkill command allows a user running any version of Microsoft Windows from XP on to "kill" a task from a Windows command line by PID (process id) or image name. This command is similar to end tasking a program in Windows.

How do I kill taskkill?

To Kill Process using Process/Image Name a) Type the following command into the run prompt, to kill only the one Process, and press Enter Key. For Example - To kill Notepad, run the command as, taskkill /IM notepad.exe /F , where /F is used to kill the process forcefully.


1 Answers

It tells taskkill that the next parameter something.exe is an image name, a.k.a executable name

C:\>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. 
like image 186
EkriirkE Avatar answered Sep 18 '22 07:09

EkriirkE