news

How to Use DISM Commands to Resolve Most Windows System Issues

Regardless of the version of Windows you are using on your device, the system is always prone to errors and technical issues. While there is a solution for almost every problem, some annoying issues, such as the blue screen of death, can leave many people feeling frustrated. Fortunately, Microsoft is committed to providing its beloved operating system with tools that can address some errors with minimal effort from the user, including a tool called “DISM.” This tool works through the Windows Command Prompt to thoroughly examine the system, repair damaged files, maintain performance stability, and address most issues in general. Let’s explore in detail how to use the tool and the different methods you can use it to fix issues before resorting to reinstalling Windows from scratch!

DISM Commands in Windows

Initially, DISM (short for Deployment Image Servicing and Management) is a small tool embedded in the Windows system. Its function is to manage a mini version of Windows image within the system itself, similar to a spare tire in cars. The tool is used to examine current system files, boot files, and drivers, compare them to the healthy mini version, and then replace any files with the original version in case of damage due to a technical malfunction. Therefore, DISM tool deals with corrupt files within the Windows system and can be used to examine the system’s condition and identify major issues through important commands like “CheckHealth,” “ScanHealth,” and “RestoreHealth.” Below, we will discuss the functionality of each command in detail.

Checking the Integrity of Windows Image

We start our explanation of the DISM tool by discussing how to use it to diagnose the Windows image in general to help you identify potential issues through the “CheckHealth” command. This command searches for corrupt files and informs you if there are any damaged files, but without repairing or replacing those files; similar to a quick check performed by antivirus programs.
To do this, run the Command Prompt tool on Windows in any way we reviewed previously, but the easiest way is to press the Win + S keys together on the keyboard to open the search bar and then type “CMD” or “Windows Terminal” if you are using Windows 11, then from the search results click on the “Run as administrator” option. Once the CMD window appears, type the following command:

DISM /Online /Cleanup-Image /CheckHealth

After clicking the “Enter” button, the checking process will begin, and if there is any problem, you will see the message “The component stored has been corrupted.” Conversely, you will see “No component store corruption detected” if everything is fine.
By the way, the term “Component Store” refers to an important part of the operating system, which is the WinSxS folder, and its function, in brief, is to store backup copies and essential components, such as update files and modifications installed on the system, which helps in restoring it when needed. When this folder encounters a problem, it affects the performance of Windows, so tools like DISM are used to examine and repair it.

Performing Advanced Scan of Windows Image

While the “CheckHealth” command acts as an initial diagnostic tool, the second command “ScanHealth” delves deeper into searching for corrupt files, hence taking longer to execute. It also keeps the scan results in an external file so that advanced users can review to identify the scanned files and any damaged ones if found. All you need to do is open the Command Prompt and execute the following command:

DISM /Online /Cleanup-Image /ScanHealth

After pressing Enter, the advanced scan of the Windows image will begin, taking slightly longer as mentioned earlier. You can track it through the progress bar, and if any problem is detected, you can then use the third tool of DISM.

Repairing Corrupt Files in Windows Image

If an issue is discovered after executing any of the two previous commands, it is time for the third command, “RestoreHealth.” This command works to restore the system to its normal state, sometimes, in case of a problem. After checking the system files and comparing them to the healthy mini version, or if the computer is online, Windows Update service will be relied on to download the original healthy files directly from Microsoft servers and replace the damaged ones. To execute the command, all you need to do is enter the following command in the Command Prompt:

DISM /Online /Cleanup-Image /RestoreHealth

The process will take slightly longer than “CheckHealth” as well, but it is likely to resolve the issue or issues you are facing with your computer.
If the device is not connected to the internet and the previous command couldn’t fix the problem, meaning a matching file was not found in the healthy mini version stored on Windows, the same process can be done by relying on a real and complete Windows ISO file that can be downloaded from Microsoft.
Once you have the ISO file, double-click on it to extract the files and display them in a virtual section called “DVD Drive.” Now, find out the drive letter of this section using the File Explorer tool, in our case it’s the letter “E” as shown in the image above. Now, open the Command Prompt as an administrator as you did with the previous commands, then execute the following command:
DISM /Online /Cleanup-Image /RestoreHealth /Source:E:\Sources\install.wim
Before pressing Enter, make sure to replace the
letter “E” with the letter of the virtual DVD Drive section, the process will take
a relatively long time as it will re-examine the corrupt files and then obtain the healthy version from the ISO file and solve all the issues you encounter.

Using SFC Command to Ensure Windows Image Repair

While the DISM tool deals with core system files and the WinSxS folder we mentioned above, there is another tool called SFC (System File Checker) that checks and automatically repairs corrupt or missing files to ensure the Windows environment’s safety. When the tool finds a modified file due to a virus, incorrect update, or any other reason, it replaces it with the healthy or original file to restore everything to its previous state. Executing this command is very simple, after opening the Command Prompt, type [SFC /scannow] and press Enter, wait for the tool to start the scanning process, and once it finishes, you will see one of the three messages:

  • First:
    “Windows Resource Protection did not find any integrity
    violations,” indicating that no damaged file was found, and your system is working properly.
  • Second: “Windows Resource Protection could not perform the requested
    operation,” meaning you may need to reuse the tool, but in
    safe mode.
  • Third: “Windows Resource Protection found corrupt files and
    successfully repaired them,” indicating that your system had a problem, but the tool
    resolved it. In this case, restart the computer, and everything should be back to normal.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button
error: Content is protected !!