Home >Common Problem >How to use DISM to repair a Windows image

How to use DISM to repair a Windows image

WBOY
WBOYforward
2023-04-14 09:43:082785browse

There are several ways to repair a Windows image, depending on whether the image is offline or online. Offline Windows images can be repaired in a VHD or WIM file, and when an online Windows image does not run as expected, it will first attempt to repair itself. This repair source uses the same repair source as the on-demand feature and is determined by Group Policy settings. When using DISM to attempt to repair an offline or online Windows image, you can specify an additional repair source location by using the /Source parameter and the /RestoreHealth parameter. If you need to scan and repair online images, you can also use the sfc /scannow command for a quick check. On the other hand, you can also choose to use DISM /Cleanup-Image for a more thorough inspection.

The first step is to make sure the image is still repairable. Here's what you need to do:

You must first do a quick scan to see if the image is corrupted. Open a command prompt on your PC and enter Dism /Online /Cleanup-Image /ScanHealth. The scan should only take a few minutes.

How to use DISM to repair a Windows image

You can use the command Dism /Online /Cleanup-Image /CheckHealth to see if your PC detects any corruption on the image. When using this sfc parameter, the DISM tool will notify you whether the Windows image is healthy, repairable, or not repairable. If it's the latter, you'll need to get rid of the image and start from scratch. However, if it is repairable, you can continue to use the /RestoreHealth parameter to start the repair.

Repairing a Windows image follows the same process as above. Open your PC's Start menu, go to Command Prompt, and enter the correct command. If you are trying to repair an offline image with the help of a mounted image as a repair source, the correct command to use is Dism /Image:C:\offline /Cleanup-Image /RestoreHealth /Source:c:\test\install\windows. However, if you want to use the source to repair an online image, enter the following command: Dism /Online /Cleanup-Image /RestoreHealth /Source:c:\test\mount\windows /LimitAccess.

How to use DISM to repair a Windows image

Please note that if you do not specify /Source , the default location for the repair files is the same as Features on Demand. You can read more about it here. On the other hand, specifying two or more sources will ensure the same result, but only the files in the first location will be copied. It is important to use /LimitAccess if you want to ensure that the DISM tool does not use Windows Update as a source to repair images.

Now, in some cases, the image is corrupted when the DISM tool tries to modify it. In this case, you can use the command Dism /Cleanup-Mountpoints to fix it.

The above is the detailed content of How to use DISM to repair a Windows image. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yundongfang.com. If there is any infringement, please contact admin@php.cn delete