Australian cloud for business software — built and run in Sydney since 2002

NetLeverage
NetLeverage

Windows Update error 0x80070002: file not found in CBS logs

Technical article
Troubleshooting

About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.

On Windows Server, Windows Update fails with 0x80070002 when a file or service the update expects is missing. Microsoft’s troubleshooting article states the error is primarily caused by missing or corrupt files needed for the update, incomplete previous updates, missing DLLs, or registry entries that point at nonexistent services or files. Open CBS.log before you change the registry or WinSxS. Treat the code and the path in CBS.log as separate pieces of evidence.

What the symptom means

Microsoft documents that installation can fail with 0x80070002 (ERROR_FILE_NOT_FOUND) across several patterns:

  • A monthly rollup fails starting clr_optimization_v4.0.30319_32 (or the 64-bit twin) when C:\Windows\Microsoft.NET\Framework\v4.0.30319 is empty.
  • Setup looks for C:\ProgramData\Microsoft\Windows\Start Menu\Programs\System Tools and cannot open it.
  • CBS reports a missing WinSxS payload such as DWrite.dll under a side-by-side package folder.
  • A cumulative update rolls back after restart when a driver INF such as flpydisk.inf cannot install.
  • An in-place upgrade log shows failure mounting winre.wim when WIMMOUNT.sys registry data is missing.

Always start from C:\Windows\Logs\CBS\CBS.log (and rolled CBSpersist… files in the same folder).

Likely causes (our reading)

Cause What you see in CBS / Event Log First check
Orphaned CLR optimisation service keys Failed StartService for clr_optimization_v4.0.30319_32/64 Empty Framework\v4.0.30319 folder
Missing System Tools Start Menu folder STATUS_OBJECT_NAME_NOT_FOUND on that path Folder exists on a healthy PC
Missing WinSxS DLL Failed to find file … DWrite.dll Package folder under WinSxS
Missing driver service keys Doqe: Failed installing driver updates flpydisk / sfloppy (example)
Missing WIM mount service data Failed to get WimMount ImagePath Upgrade / SafeOS path

Prove the cause before changing anything

These steps only read.

1. Capture the failing update name from Event Viewer (Microsoft’s sample is Event ID 20 from Microsoft-Windows-WindowsUpdateClient with description text that includes error 0x80070002).

2. Search CBS.log for 80070002 or ERROR_FILE_NOT_FOUND around the failure time. Write down, in a note you keep with the change record (for example wu-80070002-cbs-snippet.txt): the exact failing path or service name, the KB or package name, and today’s date.

3. Match one Microsoft symptom. Confirm which of the five patterns on the Microsoft page your snippet matches before you delete registry keys or copy files.

4. Back up the OS disk. Microsoft’s article requires a backup of the operating system disk before troubleshooting.

Fix

Apply only the resolution that matches the proven symptom. Microsoft warns that incorrect registry edits can cause serious problems and requires a registry backup first.

Symptom 1: delete orphaned CLR optimisation service keys

Microsoft’s page says to back up and delete these registry keys, and links its registry backup guidance. Write down, in a note you keep with the change record (for example wu-80070002-clr-reg-before.txt): the full path to each .reg backup you create for the keys below, and today’s date:

  • HKLM\System\CurrentControlSet\services\clr_optimization_v4.0.30319_32
  • HKLM\System\CurrentControlSet\services\clr_optimization_v4.0.30319_64

Back up those keys first (Microsoft: back up the registry before you modify it so you can restore it if a problem occurs), then proceed.

Risk: the next step deletes those service registry keys. If you delete the wrong key, .NET optimisation services may not start until you restore the backup named in your note.

Delete only those two keys as Microsoft describes, then retry the update.

To undo it: restore the registry from the .reg backups named in wu-80070002-clr-reg-before.txt, returning those keys to the exact values you saved.

Symptom 2: restore the System Tools folder — description

Microsoft’s page says to copy the System Tools folder from a working machine to the affected machine, ensuring all shortcuts are included. The path on the page is C:\ProgramData\Microsoft\Windows\Start Menu\Programs\System Tools.

Symptom 3: missing WinSxS package files

Microsoft’s case-specific repair changes the permissions of WinSxS, restores the named file, repairs the component store with DISM, and then installs the matching standalone update. It is not a general fix for 0x80070002. Keep the CBS log, package identity, update KB and Windows build for the administrator handling the repair.

This sequence can leave the component store or the installed update in a different state. Have a verified recovery image and a tested restore route before attempting it on a server; deleting the copied folder does not restore permissions, undo DISM repairs or remove an installed update.

Symptom 4: import missing driver service keys — description

Microsoft’s example exports HKLM\System\CurrentControlSet\Services\flpydisk and HKLM\System\CurrentControlSet\Services\sfloppy from a working computer and imports them on the computer with the issue. The resolution depends on what is missing; the page uses those two keys for the flpydisk.inf example.

Symptom 5: restore WIMMOUNT.sys registry data — description

For upgrade failures with missing WimMount ImagePath, Microsoft’s page says to export HKLM\System\CCS\Services\Wimmount.sys from a working server and merge it on the affected server.

Confirm the fix

  1. The same update installs without 0x80070002.
  2. CBS.log no longer repeats the same missing path at install time.
  3. Registry or WinSxS exports from the change record remain archived until the window closes.

What to watch afterwards

  • Symptom 1 on Microsoft’s page starts from an empty C:\Windows\Microsoft.NET\Framework\v4.0.30319 folder with failed StartService for clr_optimization.
  • Broad component-store repair belongs with DISM and SFC diagnosis when CBS shows corruption rather than a single missing path.
  • Access-denied update failures are a different code path (0x80070005).

Risks and limits

These steps have not been lab-tested.

Microsoft’s article is written for Windows Server monthly rollup and related CBS patterns; match the log text before you delete keys. Our own advice: never delete WinSxS packages that CBS did not name.

Sources