How To Use DISM to Repair Windows (Complete Guide)

You must’ve encountered instances of your Windows not acting right or certain storage-oriented functions of Windows not working just right. Well, this is probably because of corruption in Windows. System files are essential for the proper functioning of Windows, and Microsoft has just the right tool inbuilt into Windows to solve this problem. This article will tell you how to use DISM to repair Windows. It applies to all versions of Windows, including Windows 11 and 10.

Use DISM To Repair Windows

What Is DISM?

DISM stands for Deployment Image Servicing And Management. It is an inbuilt tool in the command line interface and can be accessed from both the command prompt or Windows Terminal and Windows PowerShell.

DISM can mount and service a Windows image from a wim file, ffu file, vhd file, or a vhdx file and also update a running operating system. That is why we can run the DISM scans, repair corrupt components of these files, and help to restore Windows PC to a healthy state.

How To Use DISM to Repair Windows

Using DISM to repair Windows system files is straightforward. You only need to execute a few commands to get it working. We have covered all the commands and their functions. Here’s all that we’ll talk about:

  1. Accessing DISM via Windows Terminal
  2. DISM Checkhealth Command
  3. DISM Scanhealth Command
  4. DISM Restorehealth Command
  5. Fix Problems With DISM Using Install.wim Image

You will need an administrator account to execute this command.

1] Accessing DISM via Windows Terminal

Follow these steps to access DISM via Windows Terminal:

  • Right-click the Windows Start icon.
  • Upon right-clicking, the Windows user power menu opens. In the Windows user, power open Windows Terminal (Admin).
  • In the Windows Terminal, you can proceed by typing DISM and pressing the enter key. This will display the entire list of commands and functions you can access with DISM. Or, you can proceed with the commands discussed in the latter part of this article.

2] DISM Checkhealth Command

The DISM Checkhealth command can detect file or component corruption in the current Windows PC. This command does not attempt any repairs. If you only wish to identify if there is a problem, use this command:

  • In the Windows terminal, paste the following command and press Enter.Using DISM Checkhealth Command
Dism /Online /Cleanup-Image /CheckHealth

This command will perform an in-depth scan of the current operating system and search the store log for any preexisting tally of errors.

3] DISM Scanhealth Command

The DISM Scanhealth command has more or less the same function as the DISM check health. But the difference comes in the intensity of scanning for errors or file corruption. While the Checkhealth command mostly looks for the logs and looks at a group of files as a whole, the Scanhealth command takes an individual file at a time. It compares the file hash to the one of a healthy file to detect any issues. Here’s how to use it:

  • In the Windows Terminal, paste the following command and press enter. DISM Scanhealth Command
Dism /Online /Cleanup-Image /ScanHealth
  • DISM will start scanning the system image for any signs of corruption. This scan will take more time in comparison to the Checkhealth command.

4] DISM Restorehealth Command 

The DISM Restorehealth command is the most crucial of the DISM commands. The Restorehealth command utilizes the Windows update files to restore healthy versions of the files or parts of files in place of the corrupt ones. During this DISM will connect to Windows Update to download and replace damaged files as required.

Here’s how to use the command.

  • In the Windows Terminal, paste the following command and hit enter. DISM Restorehealth Command
DISM.exe /Online /Cleanup-image /Restorehealth

The process will take some time, depending upon the extent of deterioration of component files.

5] Fix Problems With DISM Using Install.wim Image

While DISM is supposed to get you out of trouble with the system image, it can sometimes have problems. One of the most common errors that users have encountered with DISM is Source files could not be found. This error primarily occurs due to an issue with the install.wim Windows image specified as the repair source, here’s how to solve this error:

  • Firstly, download and mount Windows 11 or 10 ISO to your computer. To mount an ISO, right-click the downloaded iso file and click on the Mount option from the context menu. Mounting an ISO in WIndows
  • Now paste the following command and hit enter. (Replace the X with the correct drive letter for the mounted iso). Displaying index numbers for different Windows versions in a mounted ISO
dism /Get-WimInfo /WimFile:X:sources/install.wim
  • This will display all the Windows versions available on the iso and their index numbers. Find the version you wish to use and note the Index number.
  • Now, paste the following command and hit enter. (Replace X with the drive letter and IndexNumber with the version index number)Reassigning Repair Source to DISM
DISM /Online /Cleanup-Image /RestoreHealth /Source:WIM:X:\sources\install.wim:IndexNumber /LimitAccess

With these steps, we intend to replace the repair source files for the DISM. Hence, resolving the DISM Source files could not be found error.

Conclusion: 

DISM has been used for a long time and works perfectly in diagnosing and fixing issues related to the system image. You can use the SFC command for a detailed scan and repair of the system. We hope you found the article to be insightful. Please make sure that you share it with everyone.

What Is The Difference Between DISM and SFC Command?

SFC can analyze and fix corrupt files in Windows PC. However, for SFC to work correctly, all the components or core files should be working. So, if SFC is not working as expected on your PC, you must first use DISM to patch faulty files in the component store of the Windows system.

Then you can run the SFC tool. On top of this, DISM works with VHD and System Images, while SFC only works on an existing system. If you are confused about which one to run first, then it should be SFC first and then DISM if the former doesn’t work as expected.

Can DISM Fix Windows Update Issues?

If Windows updates or Service packs fail to install, it may be due to corruption errors in the system. Corrupted system files can impede the installation of an update. To resolve the issue, one may use the DISM or System Update Readiness tool to fix Windows corruption errors.

The Restorehealth option allows DISM to connect with Microsoft Windows Update servers, download files, and replace them based on version.

LEAVE A REPLY

Please enter your comment!
Please enter your name here