Command Prompt Won't Open

Beginner Command Prompt Fixes Applies to: Windows 7, Windows 10, Windows 11

Typing "cmd" into the Start menu does nothing, or Command Prompt flashes open and immediately closes.

Before you start: save any open work and note down what you were doing when the problem started — that context helps if you need to search further or ask for help.
  1. Try opening it a different way: press Windows+R, type cmd, and press Enter, to rule out a Start menu search issue specifically.
  2. If it flashes and closes instantly, that usually means a script or batch file is running and finishing immediately — try right-clicking the shortcut and choosing "Run as administrator" instead of double-clicking it.
  3. Check whether Command Prompt has been disabled by a policy: press Windows+R, type gpedit.msc (not available on Home editions), and check User Configuration > Administrative Templates > System for a "Prevent access to the command prompt" setting.
  4. Run "sfc /scannow" from PowerShell instead (right-click Start > Terminal/PowerShell) to check for corrupted system files that might be affecting cmd.exe specifically.
  5. As a last resort, search for cmd.exe directly in C:\Windows\System32 and try launching it from there to rule out a broken shortcut or Start menu entry.
Still not fixed? Send us the details and we'll help you dig further, or browse related guides in Command Prompt Fixes.

Frequently Asked Questions

Could malware really block Command Prompt from opening?
Yes — some malware and certain group policy restrictions specifically disable Command Prompt to make it harder to run diagnostic or removal commands, so this is worth taking seriously rather than assuming it's just a glitch.
Is PowerShell a safe substitute if Command Prompt won't open?
Yes — PowerShell can run most of the same commands and is a reasonable temporary workaround while you figure out why Command Prompt itself isn't opening.

Related guides