How to fix error 0x80070002 Windows Update
- Supported versions of Windows Server
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
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.
- Go to a second computer that is working normally and running the same operating system version.
- Open File Explorer and navigate to C:\ProgramData\Microsoft\Windows\Start Menu\Programs.
- Locate the folder named System Tools. Right-click the System Tools folder, select Copy, and paste it onto a USB flash drive.
- Unplug the USB drive and insert it into the computer that is experiencing the update error.
- On the affected computer, open File Explorer and navigate to C:\ProgramData\Microsoft\Windows\Start Menu\Programs.
- Paste the copied System Tools folder into this location so that the full folder path exists on your hard drive.
- 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
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.
- Press the Windows Key + R on your keyboard to open the Run dialog box.
- Type regedit into the text field and click OK. Click Yes if the User Account Control prompt appears.
- In the left panel of Registry Editor, expand the folders to navigate to HKLM\System\CurrentControlSet\services\clr_optimization_v4.0.30319_32.
- 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.
- Next, navigate to HKLM\System\CurrentControlSet\services\clr_optimization_v4.0.30319_64.
- Right-click the clr_optimization_v4.0.30319_64 key, select Export for backup, and then right-click and click Delete.
- 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.
- Click Start, type cmd, right-click Command Prompt, and click Run as administrator.
- In the command window, type takeown /f c:\windows\winsxs and press Enter.
- Type icacls c:\windows\winsxs /grant administrators:F and press Enter.
- Type cd c:\windows\winsxs and press Enter.
- Check your CBS log for the exact missing folder name (for example, x86_microsoft-windows-directwrite_31bf3856ad364e35_7.1.7601.23545_none_c67f532e01cd149d).
- Type mkdir followed by the folder name (e.g., mkdir x86_microsoft-windows-directwrite_31bf3856ad364e35_7.1.7601.23545_none_c67f532e01cd149d) and press Enter.
- Copy the missing DLL file from a working computer to c:\windows\temp\dwrite.dll on the affected machine.
- Type copy c:\windows\temp\dwrite.dll c:\windows\winsxs\x86_microsoft-windows-directwrite_31bf3856ad364e35_7.1.7601.23545_none_c67f532e01cd149d and press Enter.
- Type DISM.exe /Online /Cleanup-image /Restorehealth and press Enter to scan for and repair system store corruptions.
- 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.
- On a working computer with the same OS version, press Windows Key + R, type regedit, and press Enter.
- Go to HKLM\System\CurrentControlSet\Services\flpydisk.
- Right-click flpydisk, select Export, name the file flpydisk.reg, and save it to a USB drive.
- Go to HKLM\System\CurrentControlSet\Services\sfloppy.
- Right-click sfloppy, select Export, name the file sfloppy.reg, and save it to the USB drive.
- Connect the USB drive to the affected computer.
- Double-click flpydisk.reg and click Yes to add the registry entries.
- Double-click sfloppy.reg and click Yes to add the registry entries.
- 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.
- On a working computer, press Windows Key + R, type regedit, and click OK.
- Navigate to HKLM\System\CCS\Services\Wimmount.sys.
- Right-click Wimmount.sys, select Export, save the registry file to a USB drive, and connect it to the affected computer.
- Double-click the exported registry file on the affected computer and click Yes to merge the key into the registry.
- 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.
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