If you’re facing the error “The source files could not be found” after running the DISM command “DISM /Online /Cleanup-Image /RestoreHealth” then you’re at the right place as today we are going to discuss how to fix the issue. The error indicates that the DISM tool cannot find the source files to repair a Windows image.
Now there are various reasons why Windows cannot find the source file such as the DISM tool is unable to find the files online in Windows update or WSUS or the most common issue is that you have specified a wrong Windows Image (install.wim) file as the repair source etc. So without wasting any time let’s see how to Fix DISM Source Files Could not be Found Error with the helo of the below-listed troubleshooting guide.
Fix DISM Source Files Could not be Found Error
Make sure to create a restore point, just in case something goes wrong.
Contents
- Fix DISM Source Files Could not be Found Error
- Method 1: Run DISM Cleanup Command
- Method 2: Specify the Correct DISM Source
- Method 3: Specify an Alternative Repair Source by using Registry
- Method 4: Specify an Alternative Repair Source by using Gpedit.msc
- Method 5: Repair Install Windows 10
- Method 6: Fix the underlying cause of DISM error
Method 1: Run DISM Cleanup Command
Open Command Prompt. The user can perform this step by searching for ‘cmd’ and then press Enter.
Type the following command into cmd and hit Enter:
DISM /Online /Cleanup-Image /StartComponentCleanup sfc /scannow
DISM /Online /Cleanup-Image /AnalyzeComponentStore sfc /scannow
- Once the above commands are finished processing, type DISM command into cmd and hit Enter:
Dism /Online /Cleanup-Image /RestoreHealth
- See if you can Fix DISM Source Files Could not be Found Error, if not then continue with the next method.
Method 2: Specify the Correct DISM Source
Most of the time the DISM command fails because the DISM tool looks online to find the required files to repair the Windows image, so instead of that, you need to specify a local source to Fix DISM Source Files Could not be Found Error.
First, you need to download Windows 10 ISO using Media Creation tool and then extract the install.wim from install.esd file using the command prompt. To follow this method, go here, then follow all the steps to accomplish this task. After that, do the following:
- Type the following command into cmd and hit Enter after each one:
DISM /Online /Cleanup-Image /RestoreHealth /Source:WIM:C:\install.wim:1 /LimitAccess
Note: Replace the “C:” drive letter according to the file location.
Wait for the DISM tool to repair the Windows image component store.
Now type sfc /scannow in cmd window and hit Enter to run System File Checker to complete the process.
Reboot your PC to save changes and see if you’re able to Fix DISM Source Files Could not be Found Error.
Method 3: Specify an Alternative Repair Source by using Registry
Note: If you’re using Windows 10 Pro or Enterprise edition, follow the next method to specify an Alternative Repair Source.
Press Windows Key + R then type regedit and hit Enter to open Registry Editor.
Navigate to the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies
Right-click on Policies then selects New > key. Name this new key as Servicing and hit Enter.
Right-click on Servicing key and then select New > Expandable String Value.
Name this new String as LocalSourcePath, then double-click to change it’s value to “wim:C:\install.wim:1” in the Value data field and click OK.
Again right-click on Servicing key and then select New > DWORD (32-bit) Value.
Name this new key as UseWindowsUpdate then double-click and change it’s value to 2 in the Value data field and click OK.
Close Registry Editor and reboot your PC to save changes.
Once the system boots up again run the DISM command and see if you’re able to Fix DISM Source Files Could not be Found Error.
If you’re successful, then undo the changes done in the registry.
Method 4: Specify an Alternative Repair Source by using Gpedit.msc
Press Windows key + R then type gpedit.msc and hit Enter to open Group Policy Editor.
Navigate to the following path in gpedit:
Computer Configuration > Administrative Templates > System
Make sure to select System them in the right window pane double-click on “Specify settings for optional component installation and component repair“.
Now select Enabled, then under “Alternate source file path” type:
wim:C:\install.wim:1
Just directly below it, checkmark “Never attempt to download payload from Windows Update“.
Click Apply, followed by OK.
Close everything and reboot your PC to save changes.
After the PC restarts, again run the “DISM /Online /Cleanup-Image /RestoreHealth” command.
Method 5: Repair Install Windows 10
This method is the last resort because if nothing works out, then, this method will surely repair all problems with your PC. Repair Install using an in-place upgrade to repair issues with the system without deleting user data present on the system. So follow this article to see How to Repair Install Windows 10 Easily.
After running the repair install of Windows 10, run the following commands in cmd:
DISM /Online /Cleanup-Image /StartComponentCleanup Dism /Online /Cleanup-Image /RestoreHealth sfc /scannow
Note: Make sure to open Command Prompt with Admin rights.
Method 6: Fix the underlying cause of DISM error
Note: Make sure to backup your Registry before performing any mention below steps.
- Navigate to the following directory:
C:\Windows\Log\CBS
Double click on the CBS file to open it.
From notepad, menu click on Edit > Find.
Type Checking System Update Readiness under “Find what” and click Find Next.
Under Checking System Update Readiness line, find the corrupt package because of which the DISM is unable to repair your Windows.
Example: In my case the corrupt package is “Microsoft-Windows-TestRoot-and-FlightSigning Package~31bf3856ad364e35~amd64~~10.0.15063.0”
Now press Windows Key + R then type regedit and hit Enter.
Navigate to the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing
Make sure to select Component-Based Servicing then press Ctrl + F to open find dialogue box.
Copy & paste the corrupt package name in the Find field and click Find Next.
You will find the corrupt package in a few locations but before doing anything, back these registry keys.
Right-click on each of these registry keys and then select Export.
Now right-click on the registry keys then select Permissions.
Select Administrators under Group or user names and then checkmark “Full Control” and click Apply followed by OK.
Finally, delete all the registry keys you found at the various location.
Search your C: drive for the test root files and if found, move them to another location.
Close everything and reboot your PC.
Run the “DISM /Online /Cleanup-Image /RestoreHealth” command again.
Recommended:
- Fix DISM Error 0x800f081f in Windows 10
- How to Restore NTBackup BKF File on Windows 10
- Fix Task Host Window Prevents Shut Down in Windows 10
- Fix Mouse Pointer Lags in Windows 10
That’s it you have successfully Fix DISM Source Files Could not be Found Error but if you still have any queries regarding this post then feel free to ask them in the comment’s section.