How do you repair Windows OS if it contains corrupted files or unknown issues? (two ways)

4 years ago hamad Reading time: 2 minutes

Last modification noticed was: (19 hours ago)

Over time, you may encounter unknown issues or missing DLL files while using Windows OS. Fortunately, there are some quick and easy solutions that can help.


To get started, we'll use the "SFC" command. This command will prompt Windows to search online for and fix any problems if necessary.

How to Get Started with the SFC Command

To start, open the Run dialog by pressing the Windows key and "R", and type "CMD".

Then, press "Control + Shift + Enter" to open the CMD window as an administrator.

Copy the command below and paste it into the CMD window. Then, press "Enter".

sfc /SCANNOW

When the command finishes, a message will be displayed letting you know if anything was damaged and fixed.

Success Message

Windows Resource Protection found corrupt files and successfully repaired them. For online repairs, details are included in the CBS log file located at windir\Logs\CBS\CBS.log. For example C:\Windows\Logs\CBS\CBS.log. For offline repairs, details are included in the log file provided by the /OFFLOGFILE flag.

A message means everything is going well in your computer

Windows Resource Protection did not find any integrity violations.

Another Command to Fix Problems

If the SFC command did not fix the issue, you can try running the DISM command. This command can help repair the Windows image and fix any issues that may be causing problems.

Copy the command below and paste it into the CMD window. Then, press "Enter".

DISM /Online /Cleanup-Image /CheckHealth

If you see the message "The component store is repairable", don't panic! This is not an error; it means Windows has identified corrupt files and confirms they can be repaired. Simply proceed with the next command (RestoreHealth) to fix them.

DISM /Online /Cleanup-Image /RestoreHealth

Once the process reaches 100%, you should see the following message indicating that the repair was successful:

The restore operation completed successfully.

If your device is in good condition, you will see the following message:

No component store corruption detected. The operation completed successfully.

Using these two commands can help fix many common issues that you may encounter while using Windows.

Important Note: After running these commands, it is highly recommended to restart your computer. This ensures that all repairs are fully applied and the system is back to its stable state.

Keep in mind that some issues may require more advanced troubleshooting or the assistance of a professional.