TechBuzzPro

How to Fix DISM Error 2 on Windows

· 4 min read · Windows & PC

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Yes, you can fix DISM Error 2 on Windows by repairing corrupted system files using built-in tools. This error typically appears when the Deployment Imaging Service and Management Tool (DISM) fails to access required files, often due to corruption in the Windows component store. The fix involves running DISM with a healthy source, using System File Checker (SFC), and ensuring Windows Update is functioning properly. Before starting, ensure your PC is connected to the internet and you have administrator rights.

What You'll Need

  • Administrator access to the Windows PC
  • Stable internet connection
  • Windows installation media (optional, but recommended for offline repair)
  • External storage (if creating installation media)

Step-by-Step

  1. Press Windows + X and select Command Prompt (Admin) or Windows Terminal (Admin) from the menu. If prompted by User Account Control, click Yes to continue.
  2. Type sfc /scannow and press Enter. This scans and repairs corrupted system files. Wait for the process to complete—it can take 15–20 minutes. If it reports issues but can’t fix them, proceed to the next steps.
  3. After SFC finishes, run the command: DISM /Online /Cleanup-Image /CheckHealth. This checks for corruption in the component store. It runs quickly and only reports if corruption is detected.
  4. If corruption is found, run: DISM /Online /Cleanup-Image /ScanHealth. This performs a deeper scan and may take 10–15 minutes.
  5. Next, execute: DISM /Online /Cleanup-Image /RestoreHealth. This attempts to repair the component store using Windows Update as the source. The process may take 20–40 minutes. If it fails with Error 2, proceed to the next steps.
  6. If DISM fails, you may need to specify a trusted source. Insert a bootable Windows USB or DVD, or mount an ISO file. Note the drive letter (e.g., D:).
  7. Run this command, replacing D: with your installation media drive: DISM /Online /Cleanup-Image /RestoreHealth /Source:D:\sources\install.esd. If your media uses install.wim instead, use that file name.
  8. If you don't have media, download the Windows Update standalone installer (via Microsoft’s Update Catalog) for KB5006753 or similar servicing stack updates, install it, and retry the DISM command.
  9. After DISM completes, run sfc /scannow again to ensure all system files are now intact.
  10. Restart your computer and check if the issue persists.

Common Mistakes

  • Running DISM without administrator privileges—always use an elevated command prompt.
  • Skipping the SFC scan before DISM—SFC can resolve minor issues that might prevent DISM from working.
  • Using incorrect source paths—ensure the install.esd or install.wim file exists at the specified location.
  • Assuming Windows Update is always reliable—network issues or corrupted update components can block DISM’s online repair.
  • Not verifying the drive letter of installation media—double-check in File Explorer before running the command.

Tips

  • Use the /LimitAccess flag with DISM if you want to prevent it from contacting Windows Update: DISM /Online /Cleanup-Image /RestoreHealth /Source:WIM:D:\sources\install.wim /LimitAccess.
  • Extract the install.wim file from ISO using tools like 7-Zip if you don’t want to mount the entire image.
  • Keep a bootable Windows USB drive on hand for future system repairs.
  • Run DISM during off-peak internet hours if using online repair, as it downloads data from Microsoft servers.
  • Check disk health using chkdsk C: /f if file corruption persists—physical drive issues can cause recurring errors.

Troubleshooting

If DISM Error 2 persists after trying the above steps, consider these actions in order:

  • Restart your PC and retry the DISM command—it may resolve temporary system locks.
  • Run Windows Update manually via Settings > Update & Security > Windows Update and install any pending updates. A faulty update can cause component store issues.
  • Reset Windows Update components: open an admin Command Prompt and run these commands in sequence: net stop wuauserv, net stop cryptSvc, net stop bits, net stop msiserver, then rename the SoftwareDistribution and Catroot2 folders. Restart the services afterward.
  • If offline repair fails, verify the integrity of your installation media—redownload the ISO if necessary.
  • As a last resort, back up your data and use Windows Reset (Settings > System > Recovery > Reset this PC) to reinstall Windows while keeping files.

Frequently Asked Questions

What causes DISM Error 2?

DISM Error 2 usually occurs when the tool can’t access the Windows Update service or the component store is corrupted. It may also stem from missing or damaged system files, network issues, or faulty update components.

Can I fix DISM Error 2 without internet?

Yes. Use a Windows installation USB or DVD as a source for the RestoreHealth command. This allows offline repair without relying on Windows Update.

Is it safe to run DISM and SFC?

Yes. Both tools are safe and designed by Microsoft to repair system files. They do not delete personal data or alter user settings.

What’s the difference between SFC and DISM?

SFC scans and repairs protected system files. DISM repairs the Windows image itself, including the component store that SFC depends on. Run SFC first; if it fails, use DISM.

Why does DISM take so long?

DISM downloads files from Microsoft servers during online repair and performs deep system checks. Large updates or slow internet can extend the time. Allow up to an hour for completion.

Do I need to reinstall Windows if DISM fails?

Not immediately. Try offline repair with installation media first. If all methods fail, resetting Windows via the recovery options is a reliable final step.