Friday, May 22, 2026

Some Useful Windows Repair Commands OTG

Ultimate Guide to Power Commands for Repairing Your Windows PC

Is your Windows computer acting sluggish, crashing unexpectedly, or failing to update? Don’t panic. Before you resort to expensive repair services or a time-consuming full reinstall, there are powerful built-in Windows repair commands that can often fix the problem.

In this guide, we will walk you through the most crucial repair commands available to fix corrupted system files, Windows image issues, boot problems, disk errors, and networking glitches. By mastering these "power commands," you can become your own tech support.

The Master Sequence: DISM & SFC

Usually, your troubleshooting journey should begin with sfc /scannow, the System File Checker. However, if SFC finishes with a message that it could not repair some files, it's time to bring out the big guns. That’s where DISM comes in.






 

1. DISM Repair Commands

DISM stands for Deployment Image Servicing and Management. Its repair function is incredible: it downloads healthy copies of corrupted system files directly from Windows Update to repair your existing system image.

Run these commands in order within an Administrator Command Prompt:

  1. Check Health: This quickly checks if your Windows image is already flagged as corrupted.



DISM /Online /Cleanup-Image /CheckHealth

  1. Scan for Corruption: This scans your entire Windows image more thoroughly for any hidden corruption.DISM /Online /Cleanup-Image /ScanHealth

  2. Repair Windows Image (Crucial Step): This is the ultimate fix. It scans the image and automatically repairs it by downloading fresh files.


DISM /Online /Cleanup-Image /RestoreHealth

The Final Step

After DISM completes its repair, it is vital that you run the System File Checker again. This ensures that SFC can now use the freshly repaired system image to fix any final local system file issues.

sfc /scannow

Fixing Drive and Boot Problems

Is your computer struggling to load files, or worse, refusing to boot into Windows at all? These commands target the health of your storage drive and the startup sequence.

2. Check Disk for Drive Errors

Bad sectors or file system corruption can cause severe instability. The chkdsk command is your best friend here.

chkdsk C: /f /r




 

Understanding the Options:

  • /f: Forces the command to fix any errors it finds.

  • /r: Tells it to locate bad sectors and recover readable information from them.

Note: You will likely be asked to type Y and restart your PC to allow the command to run before Windows fully loads.

3. Boot Repair Commands (If Windows Won’t Boot)

If your computer turns on but cannot load into the Windows desktop, you need to repair the "boot sector." To run these commands, you must open the Command Prompt from the Windows Recovery Environment (WinRE) using a bootable Windows installation USB or DVD.

  • Repair Master Boot Record (MBR): Good for fixing very early boot errors.


bootrec /fixmbr

  • Repair Boot Sector: Repairs the partition’s own boot sector.

bootrec /fixboot

  • Scan Windows Installations: Locates all valid Windows installations on your drives.


bootrec /scanos

  • Rebuild Boot Configuration Data (BCD): Rebuilds the essential database that tells Windows how to boot.

bootrec /rebuildbcd

Solving Update and Network Glitches

Are updates repeatedly failing, or are you unable to connect to the internet even though other devices can? These resets often clear up the confusion.

4. Reset Windows Update Components

This clears the temporary cache that can sometimes become corrupted, causing updates to stall or fail. You must run these commands as an Administrator.

Step A: Stop Essential Servicesnet stop wuauservnet stop cryptSvcnet stop bitsnet stop msiserver

Step B: Rename the Update Caches (This keeps the old folders as a backup while creating fresh ones)

ren C:\Windows\SoftwareDistribution SoftwareDistribution.old

 

ren C:\Windows\System32\catroot2 catroot2.old







Step C: Restart the Services 

net start wuauserv 

net start cryptSvc 

net start bits 

net start msiserver

5. Repair Network Problems

Networking stacks can become misconfigured over time. This sequence refreshes your TCP/IP stack, winsock catalog, and clear your DNS cache, essentially giving your network card a fresh start.

  1. Reset TCP/IP:

    netsh int ip reset

  2. Reset Winsock:

    netsh winsock reset

  3. Flush DNS:

    ipconfig /flushdns

Remember to restart your PC immediately afterward.

Advanced Hardware and System Level Repairs

Sometimes the issue lies with your hardware (RAM) or with recently installed software or drivers. These tools are indispensable for deep system health checks.

6. Memory Diagnostic Tool

Checking your RAM (Memory) is crucial if you are experiencing random crashes, freezing, or "blue screen of death" errors.

  1. Press Windows Key + R.

  2. Type mdsched.exe and hit Enter.

  3. Choose Restart now and check for problems.





 

Your computer will restart and run a comprehensive test before Windows loads. When Windows finally restarts, a notification will display the test results.

7. System Restore (rstrui.exe)

This is the ultimate "undo" button for system damage caused by faulty drivers, problematic updates, or recent system changes. It rolls back essential system files, registry settings, and installed programs to a previous date—all without affecting your personal files (like photos or documents).

  1. Type rstrui.exe into the Windows search bar or the Run command and hit Enter.

  2. Follow the prompts to select a working restore point.

8. The Ultimate Full Repair Sequence

If your PC feels unstable, slow, crashing often, or you simply want to do a thorough housekeeping session, this is the recommended "best practice" order to run your most powerful built-in tools. Run these in order as an Administrator:

  1. DISM /Online /Cleanup-Image /RestoreHealth
  2. sfc /scannow
  3. chkdsk C: /f /r


Then, restart your computer.

9. Optional Performance Repair Commands

If you are just looking for general housekeeping to regain disk space or analyze a performance slump:

  • Clean Temporary Files: Type cleanmgr into search to launch the Disk Cleanup tool.

  • Open Performance Monitor: To generate a detailed system performance analysis report, open Command Prompt (Admin) and type: perfmon /report. Windows will analyze your system for 60 seconds and produce a comprehensive report on potential bottlenecks.

The "Last Resort" Repair Options

If all of the above power commands fail to resolve your deep-seated corruption or instability issues, it is time to consider more significant measures.

10. Last Resort Repair Options

Reset This PC Settings → System → Recovery → Reset this PC This refreshes the entire system but gives you the option to keep your personal files. It will, however, remove all installed apps and restore system settings.

The Preferred Fix: In-Place Upgrade Repair This is often a better option than a full reset because it performs a complete reinstallation of Windows while keeping all your files, settings, and apps.

To perform this, you will need to create Windows installation media. You can download the tool needed to create a Windows ISO or USB directly from the official Microsoft site.

👉 Download the Windows Media Creation Tool from the Microsoft Windows Download Center

Run the setup.exe from inside your existing Windows installation, and ensure you select the option to Keep files and apps.

No comments:

Post a Comment