Someone here at the office just asked me how to kill a process in XP at the command line. Presumably they wanted to kill a process in a batch file. Seeing I had to look it up myself, I thought it might be useful to you too.

If you know the name of a process to kill, for example sol.exe (the solitaire game), use the following command from a command prompt to kill it:

taskkill /IM sol.exe

The /IM switch 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 810, use the following command to kill it. Use the PID if you have more then one copy of the process running:

taskkill /PID 810

Side note for newbies: For those of you still new to computers, you can access command line by going to start – run, type cmd in the space given and then hit ok.