> ## Content Index
> Fetch the complete content index at: https://winerror-repair.org/llms.txt
> Use this file to discover other available public pages before exploring further.

# DISM Error 2: Check the Target, Source and Servicing Logs
- URL: https://winerror-repair.org/dism-error-2/
- Published: 2026-11-20T20:33:42.000Z
- Updated: 2026-11-21T09:56:50.000Z
- Description: Separate an offline image-path failure from an error during an online scan. Check the target, repair source and matching servicing logs before another repair.
- Author: Daniel Hayes
- Tags: Windows system file repair

Save the command that ended with **DISM Error 2**, then check whether it targeted the running Windows installation or an offline image. Correct a missing target or source before trying another repair. If DISM already loaded Windows and failed during a scan, use the servicing logs to identify the missing item instead of assuming the drive letter is wrong.

Microsoft defines [error 2 as ERROR\_FILE\_NOT\_FOUND](https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes--0-499-?ref=winerror-repair.org): “The system cannot find the file specified.” Error 3 is the separate path-not-found code. The number alone doesn't identify the file, prove disk damage or justify rebuilding the registry.

## Match the command to the failure

Keep the full command, final message, Windows version and any image version shown. Include `/Source`, `/LimitAccess` and `/LogPath` if present. Those details distinguish these routes:

| What failed                                          | Check first                                       |
| ---------------------------------------------------- | ------------------------------------------------- |
| /Image: cannot access or initialize an offline image | The actual Windows root or mounted-image folder.  |
| /Online loads the image, then a scan returns error 2 | The matching DISM and CBS failure entries.        |
| A command names a local repair source                | Whether that exact source exists and is suitable. |
| No error yet; the percentage has stopped moving      | The active run's logs and system activity.        |

If the failing command used `/Get-CurrentEdition`, `/AnalyzeComponentStore` or `/StartComponentCleanup`, keep that operation in your notes. Don't switch to component cleanup as an unexplained test for error 2.

I'd keep an unfinished repair separate from a completed error. A stationary progress line needs the [DISM progress checks](https://winerror-repair.org/windows-11-dism-stuck-at-62-3/); don't open another repair window while the original operation is still active.

## Check the running Windows installation

For Windows you have booted into normally, search for **cmd**, right-click **Command Prompt** and choose **Run as administrator**. Approve the request with an authorized administrator account. Microsoft's [system-file repair instructions](https://support.microsoft.com/en-us/topic/use-the-system-file-checker-tool-to-repair-missing-or-corrupted-system-files-79aa86cb-ca52-166a-92a3-966e85d4094e?ref=winerror-repair.org) use this administrator console.

![Windows Search showing Command Prompt and the Run as administrator context-menu option.](https://storage.ghost.io/c/a6/05/a605dee4-a7e9-4ae9-b795-ec5121bbb083/content/images/2026/11/dism2-ui.webp)

Select Run as administrator for a new repair in the running Windows installation. [Open the full-size Search menu](https://storage.ghost.io/c/a6/05/a605dee4-a7e9-4ae9-b795-ec5121bbb083/content/images/2026/11/dism2-ui.webp?ref=winerror-repair.org).

`/Online` means the operating system currently running. It doesn't mean “download from the internet,” and it isn't the right way to select the installed Windows on disk while you're booted into recovery. Microsoft documents that distinction in the [DISM global options](https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/dism-global-options-for-command-line-syntax?ref=winerror-repair.org).

Once the previous servicing operation has ended, check the recorded health state:

```
DISM /Online /Cleanup-Image /CheckHealth
```

`/CheckHealth` checks whether corruption has already been flagged; it doesn't perform a full scan. For a component-store scan, use:

```
DISM /Online /Cleanup-Image /ScanHealth
```

If the scan itself returns error 2, go to the log check below. If Windows reports a repairable image, the documented repair is:

```
DISM /Online /Cleanup-Image /RestoreHealth
```

[Microsoft's image-repair guidance](https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/repair-a-windows-image?ref=winerror-repair.org) separates checking, scanning and repairing. A successful health query doesn't establish that a later repair or the original broken application has been fixed. Keep each final result.

## Verify an offline Windows root

In Windows Recovery or Windows PE, first identify the installed Windows you intend to service. Drive letters can change: Microsoft's [Windows PE deployment guidance](https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/configure-uefigpt-based-hard-drive-partitions?ref=winerror-repair.org) explains that reassignment. Don't assume the desktop's C: is still C:.

Inspect the candidate volume without changing its partitions. For example, if you believe Windows is on D:, check:

```
dir D:\Windows\System32
dir D:\Users
```

D: is an example, not a drive to copy blindly. Confirm that the folders belong to the intended installation. A locked, unreadable or unidentified volume needs that access problem resolved first. Keep files backed up before repair writes; Microsoft's [recovery guidance](https://support.microsoft.com/en-us/windows/experience/backup-recovery/windows-recovery-environment?ref=winerror-repair.org) also notes that some tools require the BitLocker recovery key. Keep that key private.

`/Image:` takes the **root of the offline Windows image**. With a standard Windows folder on the confirmed D: volume, a health query would be:

```
DISM /Image:D:\ /Cleanup-Image /CheckHealth
```

The target is `D:\`, rather than `D:\Windows`. For a mounted deployment image, use the folder containing the mounted Windows tree; creating an empty folder doesn't mount an image. A nonstandard Windows-directory name requires the documented `/WinDir` option, so have that layout checked rather than appending folders until the error changes.

For a full scan of that confirmed offline target, use `DISM /Image:D:\ /Cleanup-Image /ScanHealth`. If the image is reported as non-repairable, stop the DISM repair path and preserve files for a supported recovery decision.

Once the offline target is confirmed and a scan identifies repairable corruption, the corresponding repair uses the same target:

```
DISM /Image:D:\ /Cleanup-Image /RestoreHealth
```

This example assumes the standard directory layout and a suitable repair source. If DISM still cannot initialize the image, save the log and the directory results before another write. Don't format, change partition flags or replace registry hives to make the path check pass.

## Check a source that the command names

A repair source is separate from the target being repaired. Verify the exact location after a reboot or media reconnection. The root of an ISO, a raw WIM file, a WIM image index and a Windows directory inside a mounted image aren't interchangeable arguments.

Use approved media for the installed Windows release, edition and architecture. Microsoft's [repair-source requirements](https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/configure-a-windows-repair-source?ref=winerror-repair.org) also explain that a target patched above the source can require files the source lacks, and that relevant language components must be included. Finding a file with the right name is only the first check.

For a suitable mounted image whose Windows directory really is `C:\RepairSource\Windows`, the online example is:

```
DISM /Online /Cleanup-Image /RestoreHealth /Source:C:\RepairSource\Windows
```

Replace that location with the verified source. If you're using `install.wim`, follow the [WIM source and edition-index checks](https://winerror-repair.org/windows-11-repair-source-index/) rather than copying a number from another ISO.

I'd leave `/LimitAccess` out unless deliberately using a local source without Windows Update fallback. That option prevents DISM from contacting Windows Update for online repairs; it doesn't correct a missing file or incompatible source. On a managed PC, have IT check the approved source and servicing policy.

## Follow the failure in the servicing logs

Use the log location printed by the failed command. For an online run, the default DISM log is `%WINDIR%\Logs\DISM\dism.log`. Open it and `%WINDIR%\Logs\CBS\CBS.log`, then inspect the entries around that run's time. In recovery, the default location can belong to the recovery environment, so don't assume the installed system's old log contains the latest attempt.

Look for the operation that failed and the object named beside the failure: an image directory, source file, package or registry key. Keep the surrounding entries and the final code together. An isolated warning earlier in a long log isn't enough to identify the cause.

A [Windows 11 Pro report on Super User](https://superuser.com/questions/1931212/dism-online-cleanup-image-aborts-with-error-2-the-system-cannto-find-the-f?ref=winerror-repair.org) shows why this matters. The online image loaded, but ScanHealth failed and CBS recorded a missing component-registry key. The author tried manual registry changes, encountered further failures and later wiped the SSD and clean-installed Windows. That outcome doesn't establish the registry edits as a successful repair. Its aborted CBS detection also listed zero detected corruptions; with the same session ending in an error, that count wasn't a completed clean scan.

The older [Microsoft Q&A offline case](https://learn.microsoft.com/en-us/answers/questions/2805214/solved-dism-exe-image-c-cleanup-image-threw-error?ref=winerror-repair.org) followed a power failure on Windows 10\. Its author reported recovery through RegBack after other suggestions failed. Microsoft later [stopped automatic RegBack backups starting with Windows 10 version 1803](https://learn.microsoft.com/en-us/troubleshoot/windows-client/deployment/system-registry-no-backed-up-regback-folder?ref=winerror-repair.org). Don't assume a modern installation has usable hive backups or replace them with another computer's files.

If the log identifies insufficient temporary space, check `/ScratchDir` deliberately. Microsoft requires an existing local scratch directory and notes that Windows PE's RAM-disk scratch space can be small. Adding that switch without a matching space problem doesn't explain a missing component-registry key.

I wouldn't use `/RevertPendingActions` as a routine “refresh DISM” step. Microsoft's [servicing command reference](https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/dism-operating-system-package-servicing-command-line-options?ref=winerror-repair.org) restricts it to recovery of an offline Windows image that didn't boot; it's unsupported on a running operating system or a Windows PE/RE image. Don't disable security software or edit COMPONENTS permissions merely because a generic repair list includes them.

## Verify the result and choose the next repair

Change one identified condition at a time so the next result is interpretable. After correcting a target or source problem, run one applicable repair and read its final message. A different code is new diagnostic evidence. If the command ends successfully in the running Windows installation, run `sfc /scannow` in the administrator console, wait for its result and retest the problem that prompted the repair.

If error 2 remains, send support the full command, online/offline mode, Windows and image versions, target and source details, plus the matching DISM/CBS excerpt. Remove private account names, device identifiers and unrelated paths from the copy you share. Retain the original locally.

When the target is valid but servicing remains damaged, I'd review the [Windows 11 repair-install routes that preserve apps](https://winerror-repair.org/windows-11-repair-install-without-losing-apps/) before choosing a reset or clean installation. Confirm the backup and recovery key first. An app-preserving procedure launched inside working Windows is different from booting an installer; if Windows won't start, protect files and have the offline recovery state reviewed. The [system repair hub](https://winerror-repair.org/tag/system-repair/) connects the narrower source, SFC and DISM paths.