Tag: sfc
Repair Windows 10 Installation
by Grant Burton on Mar.18, 2016, under Windows 10
If the Windows 10 installation is damaged, it can be repaired using SFC and DISM online:
- Run SFC from an elevated command prompt to perform an initial scan and replace corrupt files
sfc /scannow
- Use the CheckHealth option with DISM to quickly determine if there are any corruptions in the local image
DISM /Online /Cleanup-Image /CheckHealth
- If no issues are found, you can run a more advanced scan using the ScanHealth option
DISM /Online /Cleanup-Image /ScanHealth
- If issues are found, use the RestoreHealth option to scan and automatically repair corrupt files
DISM /Online /Cleanup-Image /RestoreHealth
If DISM is unable to access Windows Update, you can use an offline disc image to repair your installation.
- Download a Windows 10 ISO file
- Open the Microsoft Windows 10 Download Site
- Click the Download tool now button
- Run the MediaCreationToolxxxxx.exe application
- Accept the terms and conditions
- Choose Create installation media (USB flash drive, DVD, or ISO file) for another PC and press Next
- Select the correct language and architecture that matches the corrupted installation
- Select the ISO option, click NEXT, choose a destination, click SAVE
- Click FINISH and browse to the location of the ISO. Double-click on the Windows.iso file to mount it
- Once the image is mounted, you can use it to restore the installation’s health (replace the “F” drive letter with the mount point’s drive letter)
DISM /Online /Cleanup-Image /RestoreHealth /Source:F:\sources\install.wim
Or you can limit the use of Windows Update with the LimitAccess optionDISM /Online /Cleanup-Image /RestoreHealth /Source:F:\sources\install.wim /LimitAccess
If you have an encrypted install.esd image from an upgrade to the latest version of Windows 10, you can use it to repair the damaged files.
- Run the command for the ESD file (update C:\$Windows.~BT\Sources to match your source)
DISM /Online /Cleanup-Image /RestoreHealth /Source:C:\$Windows.~BT\Sources\Install.esd
You can also limit access to Windows Update as well with the LimitAccess switchDISM /Online /Cleanup-Image /RestoreHealth /Source:C:\$Windows.~BT\Sources\Install.esd /LimitAccess
The log files for SFC and DISM are stored in the following locations: %windir%/Logs/CBS/CBS.log and %windir%\Logs\DISM\dism.log. The logs will show if the programs had trouble replacing a file.