Force-Close a Frozen Program with taskkill

End an unresponsive application from Command Prompt using taskkill by image name or PID.

WindowsProcessessystemcmdMedium risk
Run `taskkill /IM notepad.exe /F` (replace notepad.exe with the program's executable) to force-close a hung app instantly.

01Command

Command
$ taskkill /IM notepad.exe /F  ::  or by process id:  taskkill /PID 12345 /F

02What it does

When Task Manager itself struggles or you prefer the command line, taskkill ends processes directly. /IM targets the executable name and /PID targets a specific process id; /F forces termination instead of politely asking the window to close. Find the exact image name or PID with Task Manager's Details tab or `tasklist`.

03Risk

RiskMedium risk
RequirementsKilling processes of other users or system processes requires an elevated prompt.
!Warning: Forcing a kill skips the save-prompt, so any unsaved document or project state in that program is gone.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • taskkill
    Microsoft Learn · vendor-doc · 2026-09-17
    Evidence: Reference lists /IM, /PID and /F (forceful termination) flags for ending one or more tasks or processes.
  • TaskKill — Kill processes from the command line
    SS64 · technical · 2026-09-17
    Evidence: Shows TASKKILL /IM image name usage and the /F force flag.

Last verified: 2026-09-19 · Category: System & Settings

06Related solutions