Copy-ready CMD repair paths with safety notes.
Use Command Prompt when Windows needs direct repair: system file checks, disk scans, DNS/IP resets, update service reset, and boot recovery.

Before you run commands
- Back up important files when Windows still opens.
- Connect the charger.
- Use an administrator Command Prompt.
- Read the note under each command before pressing Enter.
Open admin CMD
- Press Start.
- Type cmd.
- Right-click Command Prompt.
- Select Run as administrator.
Repair corrupted Windows files.
Run DISM first to repair the Windows component store, then SFC to scan protected system files.
DISM /Online /Cleanup-Image /RestoreHealth
sfc /scannow
What good output looks like
DISM should finish with a successful operation message. SFC may report no violations, successful repairs, or files it could not repair.
If SFC cannot fix everything
Restart, run the pair again once, then check the CBS log or request support. Repeated corruption can point to disk, RAM, update, or malware problems.
Check storage without making the problem worse.
chkdsk C: /scan
chkdsk C: /f /r
Data warning
If the drive clicks, disappears, shows SMART failure, or contains irreplaceable files, stop and back up or use professional recovery. Heavy disk repair on a failing drive can reduce recovery chances.
Reset DNS, IP, and network stack.
ipconfig /flushdns
ipconfig /release
ipconfig /renew
netsh winsock reset
netsh int ip reset
shutdown /r /t 0
Restart is important after Winsock/TCP/IP reset. If the problem returns, inspect drivers, VPN software, proxy settings, router firmware, and ISP status.
Reset update services after basic repair fails.
Use only after the troubleshooter, restart, DISM, and SFC do not solve the update problem.
net stop wuauserv
net stop cryptSvc
net stop bits
net stop msiserver
ren C:\Windows\SoftwareDistribution SoftwareDistribution.old
ren C:\Windows\System32\catroot2 catroot2.old
net start wuauserv
net start cryptSvc
net start bits
net start msiserver
Use boot repair only from Windows Recovery Environment.
Important
Boot commands can affect startup records. If BitLocker is enabled, confirm the recovery key first. If data is critical, back up before changing boot files.
bootrec /fixmbr
bootrec /scanos
bootrec /rebuildbcd
diskpart
list volume
select volume <EFI_VOLUME_NUMBER>
assign letter=S:
exit
bcdboot C:\Windows /s S: /f UEFI
| Goal | Command | Use when | Caution |
|---|---|---|---|
| System files | DISM + sfc | Windows feels corrupted, apps crash, update errors | Run as administrator and let scans finish |
| Disk | chkdsk C: /scan | Disk warnings or file-system errors | Back up first if drive health is questionable |
| DNS/IP | ipconfig /flushdns | Websites fail, DNS errors | Does not fix ISP or router outage |
| Network stack | netsh winsock reset | Broken connection after VPN/malware/driver changes | Restart required |