When Command Prompt opens but immediately freezes or becomes unresponsive, it usually indicates a system process conflict, corrupted user profile, or interfering startup item. This guide provides practical steps to diagnose and resolve the issue without reinstalling Windows.

What You'll Need

  • Administrator access to the Windows account
  • Access to Safe Mode (built into Windows)
  • Optional: USB drive for creating recovery media if system won't boot normally

Step-by-Step

  1. Press Ctrl + Shift + Esc to open Task Manager. If it opens normally, go to the Details tab, find cmd.exe, right-click it, and select End task. This clears any hanging instances.
  2. Press Win + R, type msconfig, and press Enter to open System Configuration. Go to the Services tab, check Hide all Microsoft services, then click Disable all. Go to the Startup tab and click Open Task Manager. Disable all startup items there, then close Task Manager and click OK in System Configuration. Restart the computer.
  3. After restart, press Win + R, type cmd, and press Enter. If Command Prompt opens and responds normally, re-enable services and startup items one by one (or in small groups) via msconfig, restarting after each change, to identify the problematic item.
  4. If Command Prompt still hangs in clean boot, press Win + X and select Windows Terminal (Admin) or Command Prompt (Admin). If the admin version works, the issue is likely user-profile related. Create a new local user account via Settings > Accounts > Family & other users > Add account > I don't have this person's sign-in information > Add a user without a Microsoft account. Log into the new account and test Command Prompt.
  5. If Command Prompt works in the new user profile, migrate personal files from the old profile (located in C:\Users\[old_username]) to the new one, avoiding copying NTUSER.DAT or other registry hive files. Then set the new account as your primary.
  6. If Command Prompt hangs even in admin mode and clean boot, run System File Checker. Open Command Prompt as administrator (if accessible via Win + X menu), type sfc /scannow, and press Enter. Wait for completion (may take 10-20 minutes). If it finds and repairs corrupt files, restart and test Command Prompt again.
  7. If sfc /scannow fails or reports unrepaired files, run DISM. In the same admin Command Prompt, type DISM /Online /Cleanup-Image /RestoreHealth and press Enter. This process can take 15-30 minutes as it downloads files via Windows Update. Do not interrupt it. After completion, run sfc /scannow again, then restart and test.
  8. If the issue persists, check for disk errors. In admin Command Prompt, type chkdsk C: /f /r and press Enter. You will be prompted to schedule the scan for next restart; type Y and press Enter. Restart the computer and allow chkdsk to run before Windows loads (this may take significant time depending on drive size and speed).
  9. After chkdsk finishes and Windows loads, test Command Prompt again. If it still hangs, consider creating Windows installation media on another PC, booting from it, and using Repair your computer > Troubleshoot > Advanced options > Startup Repair or System Restore to a point before the issue began.

Common Mistakes

  • Assuming the issue is always caused by malware and running multiple scanners unnecessarily—while malware can cause this, it's less common than software conflicts or profile corruption.
  • Skipping the clean boot test and jumping directly to system file repairs, which wastes time if a third-party startup item is the real culprit.
  • Copying the entire NTUSER.DAT file when migrating user profiles, which can transfer the same registry corruption causing the issue.
  • Interrupting DISM or sfc scans prematurely, which can leave the system in an inconsistent state.
  • Overlooking that Windows Terminal (if installed) may work while the classic Command Prompt hangs—testing both helps isolate whether the issue is specific to conhost.exe or the console host process.

Tips

  • If you can open PowerShell but not Command Prompt, the issue is likely tied to the CSRSS (Client Server Runtime Subsystem) or conhost.exe interaction with your user environment—focus on user profile and startup items.
  • When testing in clean boot, note that some hardware drivers (like touchpad or keyboard utilities) may be disabled; use a basic USB mouse and keyboard if needed.
  • Keep a log of which startup item or service you re-enable before each restart to simplify troubleshooting.
  • If the problem started after a Windows update, use Settings > Update & Security > Recovery > Go back to the previous build (if within 10 days) or System Restore.
  • For domain-joined computers, contact your IT administrator—the issue may stem from group policy scripts or login scripts that hang during console initialization.

Troubleshooting

If Command Prompt still hangs after all steps:

  • Boot from Windows installation media, choose Repair your computer, then Command Prompt from the recovery environment. Try running sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows from there to repair the offline system.
  • Test if the issue occurs in Safe Mode (press F8 during boot or hold Shift while clicking Restart). If Command Prompt works in Safe Mode, the problem is definitely a third-party driver or service.
  • Consider creating a new user profile via the recovery environment Command Prompt using net user commands if the standard method fails.
  • As a last resort, back up data and perform an in-place upgrade using Windows installation media—this reinstalls system files while preserving apps, data, and settings.

Frequently Asked Questions

Can a Windows update cause Command Prompt to hang?

Yes, rare cases exist where a corrupted update or driver package interferes with console processes; uninstalling recent updates via Settings > Update & Security > Windows Update > Update history > Uninstall updates may help.

Is it safe to disable all startup items in msconfig?

Yes, for troubleshooting—it only prevents non-Microsoft apps from launching at startup; you can re-enable them later. Essential Windows services remain active due to the 'Hide all Microsoft services' filter.

What if I don't have admin access to fix this?

You must have admin rights to perform most fixes. If locked out, boot into Safe Mode with Command Prompt (via recovery environment) or use another admin account on the same PC.

Does this issue affect PowerShell or Windows Terminal?

It can, but often one works while another doesn't—testing all three helps determine if the problem is with the console host (conhost.exe) or the specific shell environment.

How long should I wait for sfc /scannow to finish?

Typically 10-20 minutes on modern SSDs, longer on HDDs or if many files are corrupted—let it complete without interruption.

Will fixing Command Prompt hanging delete my files?

No, the steps outlined here preserve personal files. Only a full factory reset or clean install would risk data loss, and those are last resorts with explicit backup warnings.