Skip to content

How to fix error 0x80070002 Windows Update

Affects
  • Supported versions of Windows Server
Daniel Okafor6 min read

Quick answer

Windows Update error 0x80070002 occurs when updates fail due to missing or corrupted system files, missing folders, or invalid registry service entries. You can resolve this issue by restoring missing directory paths, deleting orphaned .NET optimization registry keys, or using DISM alongside manually restored assembly files. Importing missing driver registry entries from a working machine also fixes recurring cumulative update rollbacks.

Error 0x80070002 translates directly to ERROR_FILE_NOT_FOUND, meaning the Windows Update process failed because it could not locate a required file, directory, or registry entry on your system. This issue typically stems from incomplete previous update installations, missing dynamic link library (DLL) files in the assembly store, or registry references that point to nonexistent services.

This error affects system stability and prevents critical security patches, rollups, and feature upgrades from successfully completing. When it strikes, updates might fail outright, security monthly rollups may halt, or updates such as Security Update for Windows (KB4586793) might repeatedly roll back after a system restart. Detailed diagnosis information is captured in log files such as C:\Windows\Logs\CBS\CBS.log (along with CBSpersisttXXXXXXXXXXXXX.log or .cab files in the same directory), WindowsUpdate.log, and Setupact.log. Before carrying out any troubleshooting, always ensure you have backed up your operating system (OS) disk or system registry to protect your data.

Method 1: Restore the missing System Tools directory

Illustration: the Windows Update page in Windows 11 Settings

Illustration: the Windows Update page in Windows 11 Settings

When to use: Use this method if CBS logs display a STATUS_OBJECT_NAME_NOT_FOUND error indicating that the directory C:\ProgramData\Microsoft\Windows\Start Menu\Programs\System Tools is missing. What to expect afterwards: Windows Update will be able to access the necessary menu path and complete file creation steps without triggering error 0x80070002.

  1. Go to a second computer that is working normally and running the same operating system version.
  2. Open File Explorer and navigate to C:\ProgramData\Microsoft\Windows\Start Menu\Programs.
  3. Locate the folder named System Tools. Right-click the System Tools folder, select Copy, and paste it onto a USB flash drive.
  4. Unplug the USB drive and insert it into the computer that is experiencing the update error.
  5. On the affected computer, open File Explorer and navigate to C:\ProgramData\Microsoft\Windows\Start Menu\Programs.
  6. Paste the copied System Tools folder into this location so that the full folder path exists on your hard drive.
  7. Open your Start menu, select Settings, click Windows Update, and click Check for updates to run the update installation again.

Method 2: Remove invalid .NET optimization registry entries

Illustration: the Windows Update page in Windows 11 Settings

Illustration: the Windows Update page in Windows 11 Settings

Warning: Modifying the registry can cause serious system issues if done incorrectly. Back up your registry keys before making any changes. When to use: Use this method if a Security Monthly Rollup fails to install because the clr_optimization_v4.0.30319_32 service fails to start, especially when C:\Windows\Microsoft.NET\Framework\v4.0.30319 is empty. What to expect afterwards: The update installer will no longer encounter errors attempting to call missing .NET framework optimization services.

  1. Press the Windows Key + R on your keyboard to open the Run dialog box.
  2. Type regedit into the text field and click OK. Click Yes if the User Account Control prompt appears.
  3. In the left panel of Registry Editor, expand the folders to navigate to HKLM\System\CurrentControlSet\services\clr_optimization_v4.0.30319_32.
  4. Right-click the clr_optimization_v4.0.30319_32 key, select Export to create a backup file, and then right-click it again and click Delete.
  5. Next, navigate to HKLM\System\CurrentControlSet\services\clr_optimization_v4.0.30319_64.
  6. Right-click the clr_optimization_v4.0.30319_64 key, select Export for backup, and then right-click and click Delete.
  7. Close the Registry Editor window, restart your computer, and check for updates.

Method 3: Restore missing WinSxS DLL files and run DISM

Warning: Taking ownership and modifying permissions on system folders changes security settings. Follow the steps carefully. When to use: Use this method if CBS logs or WindowsUpdate.log show missing files in the Side-by-Side store, such as a missing DWrite.dll file. What to expect afterwards: Missing assembly files will be restored, and DISM will successfully clean up and repair the image store.

  1. Click Start, type cmd, right-click Command Prompt, and click Run as administrator.
  2. In the command window, type takeown /f c:\windows\winsxs and press Enter.
  3. Type icacls c:\windows\winsxs /grant administrators:F and press Enter.
  4. Type cd c:\windows\winsxs and press Enter.
  5. Check your CBS log for the exact missing folder name (for example, x86_microsoft-windows-directwrite_31bf3856ad364e35_7.1.7601.23545_none_c67f532e01cd149d).
  6. Type mkdir followed by the folder name (e.g., mkdir x86_microsoft-windows-directwrite_31bf3856ad364e35_7.1.7601.23545_none_c67f532e01cd149d) and press Enter.
  7. Copy the missing DLL file from a working computer to c:\windows\temp\dwrite.dll on the affected machine.
  8. Type copy c:\windows\temp\dwrite.dll c:\windows\winsxs\x86_microsoft-windows-directwrite_31bf3856ad364e35_7.1.7601.23545_none_c67f532e01cd149d and press Enter.
  9. Type DISM.exe /Online /Cleanup-image /Restorehealth and press Enter to scan for and repair system store corruptions.
  10. Download and install the standalone package for the update directly from the Microsoft Update Catalog.

Method 4: Import missing driver registry keys

Warning: Exporting and importing registry files alters system service keys. Back up your registry before proceeding. When to use: Use this method when cumulative updates, such as Security Update for Windows (KB4586793), roll back after restarting due to driver installation errors like flpydisk.inf in the CBS log. What to expect afterwards: Missing driver service entries will be recreated, allowing cumulative updates to complete without rolling back.

  1. On a working computer with the same OS version, press Windows Key + R, type regedit, and press Enter.
  2. Go to HKLM\System\CurrentControlSet\Services\flpydisk.
  3. Right-click flpydisk, select Export, name the file flpydisk.reg, and save it to a USB drive.
  4. Go to HKLM\System\CurrentControlSet\Services\sfloppy.
  5. Right-click sfloppy, select Export, name the file sfloppy.reg, and save it to the USB drive.
  6. Connect the USB drive to the affected computer.
  7. Double-click flpydisk.reg and click Yes to add the registry entries.
  8. Double-click sfloppy.reg and click Yes to add the registry entries.
  9. Restart the affected machine and attempt to install the update again.

Method 5: Restore WIMMOUNT registry entries for upgrade errors

Warning: Modifying WIM mounting service registry entries impacts upgrade image handling. Make sure to back up system keys first. When to use: Use this method if a Windows upgrade fails with error 0x80070002 and error 0xC1420121 in Setupact.log when attempting to mount C:$WINDOWS.~BT\Sources\SafeOS\winre.wim. What to expect afterwards: The setup engine will successfully mount the WIM recovery file and complete the operating system upgrade.

  1. On a working computer, press Windows Key + R, type regedit, and click OK.
  2. Navigate to HKLM\System\CCS\Services\Wimmount.sys.
  3. Right-click Wimmount.sys, select Export, save the registry file to a USB drive, and connect it to the affected computer.
  4. Double-click the exported registry file on the affected computer and click Yes to merge the key into the registry.
  5. Restart your system and rerun the Windows upgrade setup program.

If nothing worked

If error 0x80070002 persists, open C:\Windows\Logs\CBS\CBS.log in Notepad and search for 0x80070002 or ERROR_FILE_NOT_FOUND to pinpoint the exact file, driver, or registry path causing the failure. You can also run the Windows Update troubleshooter to automatically address general update service glitches, or manually download cumulative packages from the Microsoft Update Catalog.

Sources

Frequently asked questions

What does Windows Update error 0x80070002 mean?

Error 0x80070002 stands for ERROR_FILE_NOT_FOUND. It means the Windows Update service cannot locate a file, directory, dynamic link library, or registry key needed to finish the update.

Where can I find the log files for error 0x80070002?

You can inspect C:\Windows\Logs\CBS\CBS.log, WindowsUpdate.log, or Setupact.log to identify the exact missing file or key associated with the failure.

Why does Security Update KB4586793 keep rolling back with error 0x80070002?

This rollback happens when driver updates like flpydisk.inf fail during installation due to missing registry service keys. Importing the flpydisk and sfloppy keys from a working machine fixes the issue.

Checked against Microsoft's release notes on ; re-checked when a new build ships.

Written by

Daniel Okafor

Writes Thea's error-code and app-breakage guides. Each fix is checked against Microsoft's documentation and community reports, and updated when a new Windows 11 build changes the steps.

More from Daniel Okafor

Related guides

  • How-To GuidesWindows 11, version 26H1

    How to run the Windows Update troubleshooter

    To run the Windows Update troubleshooter in Windows 11, navigate to Settings > System > Troubleshoot > Other troubleshooters and click the Run button next to Windows Update. The tool automatically scans background update components, resolves configuration errors, and clears cached files. After the process finishes, restart your computer and check for updates again.

    Priya Natarajan

  • Error CodesWindows 10

    How to fix INACCESSIBLE_BOOT_DEVICE after Windows update

    The INACCESSIBLE_BOOT_DEVICE error (Stop error 7B) occurs when Windows loses access to its system partition during startup after installing an update. You can resolve this issue by booting into the Windows Recovery Environment (WinRE) using installation media to revert pending update actions with DISM, rebuild the boot configuration database, or repair damaged boot files.

    Daniel Okafor

  • Error CodesWindows 11

    How to fix error 0x800f0922 in Windows 11

    Error 0x800f0922 (CBS_E_INSTALLERS_FAILED) occurs when Windows Update fails to complete an advanced installation task, often due to corrupted scheduled tasks or blocked staged update packages. You can fix this by running the built-in Windows Update troubleshooter, removing staged packages using DISM, or clearing corrupted Task Scheduler registry keys. Follow the ordered methods below to safely restore your system's update capability.

    Daniel Okafor

  • How-To GuidesWindows 11, version 25H2

    How to check which Windows 11 build you have

    To check your Windows 11 build on pre-release builds, look at the desktop watermark in the lower-right corner of your screen. You can also view your Windows core version, Insider channel, and build details by going to Settings > Windows Update > Windows Insider Program. For packaged applications, top-level version numbers can be checked directly in Settings > Apps > Installed apps.

    Priya Natarajan

  • How-To GuidesWindows 11, version 24H2

    How to uninstall a Windows 11 update

    To uninstall a Windows 11 update, open Settings and navigate to Settings > Windows Update > Update history. Scroll down to select Uninstall updates, locate the update you wish to remove, and click Uninstall. If you encounter errors during removal, you can open the Get Help app or run the Windows Update troubleshooter.

    Priya Natarajan