The Blue Screen of Death (BSOD) is one of the most frustrating errors Windows users can experience. It occurs when Windows encounters a critical system error and cannot recover, forcing the system to shut down. BSODs are usually caused by hardware failures, corrupt system files, driver conflicts, or boot-related issues.
Fortunately, Command Prompt (CMD) provides several powerful tools to diagnose and fix BSOD errors. This guide will walk you through a step-by-step process to repair BSOD using CMD commands, ensuring your system is restored without needing a complete reinstallation.
Common BSOD Error Codes and What They Mean
Before jumping into fixes, it’s helpful to understand common BSOD error codes:
BSOD Error Code | Meaning |
---|---|
SYSTEM_SERVICE_EXCEPTION | Faulty drivers or corrupted system files |
MEMORY_MANAGEMENT | RAM-related issues or page file errors |
CRITICAL_PROCESS_DIED | A crucial system process unexpectedly stopped |
INACCESSIBLE_BOOT_DEVICE | Corrupt boot files or drive failure |
DRIVER_IRQL_NOT_LESS_OR_EQUAL | Conflicting or outdated drivers |
Once you identify your error, follow the fixes below to resolve the issue using Command Prompt.
Preparing Your System Before Running Fixes
Before proceeding, follow these important steps:
- Boot into Windows Recovery Mode:
- Turn off your PC and turn it back on.
- When the Windows logo appears, press and hold Shift + F8 to enter recovery mode.
- Select Advanced Options > Command Prompt.
- Back Up Important Files (if Windows is accessible).
Fixing Blue Screen Using Command Prompt (Step-by-Step Methods)
1. Run SFC (System File Checker) to Fix Corrupt Files
Corrupt system files often trigger BSOD errors. Run the SFC command to fix them:
- Open Command Prompt (Admin).
- Type:
sfc /scannow
- Press Enter and wait for the scan to complete.
- Restart your PC and check if the BSOD error persists.
2. Run CHKDSK to Fix Hard Drive Errors
If your hard drive has bad sectors, CHKDSK can repair them:
- Open Command Prompt in recovery mode.
- Type:
chkdsk /f /r C:
- Press Enter (Replace C: with your system drive letter).
- Restart your PC after the scan completes.
3. Use DISM to Repair Windows System Image
The DISM tool fixes deeper Windows corruption:
- Open Command Prompt as Administrator.
- Type the following and press Enter:
DISM /Online /Cleanup-Image /RestoreHealth
- Wait for the process to complete, then restart your PC.
4. Fix Boot Issues Using Bootrec Commands
If your PC won’t boot or shows INACCESSIBLE_BOOT_DEVICE, use these 5 Bootrec methods:
Method | Command to Use | When to Use It |
---|---|---|
Fix Master Boot Record (MBR) | bootrec /fixmbr | Corrupted MBR preventing boot |
Repair Boot Sector | bootrec /fixboot | Invalid boot sector after update |
Scan for Windows Installations | bootrec /scanos | Missing Windows installation |
Rebuild Boot Configuration Data (BCD) | bootrec /rebuildbcd | No bootable OS found |
Reset Boot Order | bcdedit /set {default} bootstatuspolicy ignoreallfailures | Infinite reboot loop |
Steps to Run Bootrec Commands
- Boot into Advanced Startup > Command Prompt.
- Enter each command from the table one by one and press Enter.
- Restart your PC and check if the BSOD is fixed.
5. Uninstall Recent Windows Updates That Cause BSOD
Windows updates sometimes introduce compatibility issues.
To remove the most recent update:
- Open Command Prompt and type:
wusa /uninstall /kb:[update-number]
- Replace
[update-number]
with the latest update code from Windows Update History. - Restart your PC.
⚠ Note: Only uninstall updates if they are confirmed to cause BSOD. Ensure you reinstall security patches later.
6. Fix Driver Issues Using Command Prompt
Faulty drivers can also trigger BSODs. Use CMD to check drivers:
- Open Command Prompt.
- Run:
driverquery
- Check for outdated or missing drivers.
To roll back a driver, type:
pnputil /enum-drivers
pnputil /delete-driver [driver-name] /uninstall
Replace [driver-name] with the problematic driver.
7. Checking for RAM and Hardware Failures
Faulty RAM can cause MEMORY_MANAGEMENT BSOD errors.
Run a memory diagnostic:
- Open CMD and type:
mdsched.exe
- Follow the on-screen instructions.
If errors are found, consider replacing the RAM module.
8. Common BSOD Fixes in One Quick Reference Table
Issue | Fix Command |
---|---|
Corrupt System Files | sfc /scannow |
Hard Drive Errors | chkdsk /f /r C: |
Corrupt Windows Image | DISM /Online /Cleanup-Image /RestoreHealth |
Boot Issues | bootrec /fixmbr, bootrec /fixboot |
Problematic Updates | wusa /uninstall /kb:[update-number] |
Faulty Drivers | pnputil /enum-drivers |
9. Preventing Future BSOD Issues (Personal Experience & Expert Tips)
From my personal experience, these tips helped prevent BSODs:
✅ Update drivers regularly to avoid conflicts.
✅ Use Windows Update cautiously – delay major updates for a week.
✅ Monitor PC temperature – Overheating causes hardware failures.
✅ Scan for malware – Certain viruses can trigger BSOD.
✅ Backup your system before making major changes.
10. Pros & Cons of Using Command Prompt for BSOD Fix
Pros | Cons |
---|---|
Fixes issues without reinstalling Windows | Commands can be complex for beginners |
Works even if Windows won’t boot | Some issues require multiple attempts |
Does not delete personal files | May not fix severe hardware failures |
11. Conclusion – Your PC is Stable Again!
If you’ve followed these steps, your BSOD issue should be resolved. Command Prompt is a powerful tool that can repair system corruption, fix boot errors, and restore stability.
Next Steps:
- Keep your drivers updated.
- Avoid installing unverified software.
- If BSOD persists, consider checking for hardware damage.
If you have encountered a different BSOD error, try applying these fixes and exploring additional troubleshooting methods.