This guide explains how to check and fix system errors on Windows using the command line tools. We'll cover the necessary commands and steps to identify and resolve common issues.
đ 1. System File Checker (SFC)
đ§ Steps
- Open Command Prompt as Administrator: Press Windows + X â select Command Prompt (Admin) or Windows Terminal (Admin).
- Run the following.
sfc /scannow
- Wait until the scan completes. Do not close the window during the process.
đ 2. Deployment Imaging Service and Management Tool (DISM)
The DISM tool repairs the Windows system image and component store.
â Commands to Run in Sequence
DISM /Online /Cleanup-Image /CheckHealth
DISM /Online /Cleanup-Image /ScanHealth
DISM /Online /Cleanup-Image /RestoreHealth
đ Description
/CheckHealth â Quickly checks for known corruption.
/ScanHealth â Performs a deeper scan for problems.
/RestoreHealth â Repairs the image using Windows Update or a specified source.
â Recommended Full Repair Sequence
- Open terminal as Administrator.
- Run the following
DISM /Online /Cleanup-Image /RestoreHealth
- Then run
sfc /scannow
âī¸ Automate with a Batch File
Instead of running each command manually, you can use a batch file to automate the process.
âļī¸ How to Run
- Right-click the file repair-windows.bat and choose Run as Administrator.
âšī¸ Notes
These tools are built into Windows and safe to use.
Requires an internet connection for DISM if using Windows Update as the repair source.
-
You can use these commands to fix issues like:
- Missing/corrupt system files
- Random crashes or BSODs
- Windows Update problems
Top comments (0)