Windows: force-close a program with taskkill
Forcibly terminate a Windows process by executable name with taskkill /F /im.
To forcibly close a Windows program from a command prompt or a script, use taskkill.
taskkill.exe /F /im notepad.exe
/imgives the image name (the executable) to terminate;/Fforces the process to stop, without letting it shut down cleanly.
Every process with that name is targeted. Replace notepad.exe with any executable name (for example taskkill.exe /F /im app.exe). Because the stop is forced, unsaved data is lost.