Killing a task from dos or batch file

Use taskkill, such as here below:

dos:> taskkill /f /im "notepad.exe"

Running a process in background from Batch file or DOS

In Unix/Linux, it is simply ending the command with an ampersand “&”, but in DOS, there is no such thing. One way to do it is to use “start” command and then minimize the window. This is an example how to do it:

dos:> start "window1" /min myprogram.exe
dos:> start "window2" /min myprogram.exe