sodcalculator

10 Tech How-To

Error Occurred While Windows Was? Fixes & Meaning

Guide 10-46479 · Updated · Step by step

If you are seeing an error message that begins with “An error occurred while Windows was…”, it usually means a system update, startup repair, or installation process failed partway through. The exact fix depends on the wording that follows, but most cases are resolved by running the Windows Update troubleshooter, clearing the update cache, or using System Restore. Below is a breakdown of the most common variants of this error, why they happen, and step-by-step solutions you can try at home.

What Does This Error Actually Mean?

The phrase “an error occurred while Windows was” is a generic prefix that appears in several different system messages. It is not one specific error code; rather, it is the opening line of a notification that Windows displays when a background operation fails. The most frequent completions are:

  • “…updating your system” – usually tied to Windows Update or driver installation.
  • “…starting” or “…shutting down” – often related to a service or driver that hangs during boot or shutdown.
  • “…installing the update” – seen when a cumulative update fails to apply.
  • “…creating a restore point” – System Protection encountered a problem.
  • “…communicating with the device” – hardware driver or USB device issue.

Because the wording is truncated, many users search for the exact phrase and find only generic advice. The key is to look at the full sentence in the error dialog, especially the part after “was”, and note any accompanying error code (like 0x80070002 or 0x800f081f). That code is your best clue for a targeted search.

Why Does This Happen? Common Root Causes

The error is rarely caused by a single factor. In most real-world cases, one of the following is at play:

  • Corrupted update cache: Windows stores downloaded update files in a temporary folder. If those files are incomplete or damaged, the update process fails.
  • Pending updates stuck: A previous update that did not finish can block new ones, leading to a loop of errors.
  • Disk space issues: Updates need several gigabytes of free space. If your system drive is nearly full, the process may abort.
  • Third-party antivirus interference: Some security programs lock system files that Windows needs to modify.
  • Driver conflicts: A recently installed driver may be incompatible with the update or with Windows itself.
  • System file corruption: Damaged system files can cause any number of errors, including this one.

It is also possible that the error appears after a forced shutdown during an update. If your computer lost power or you held the power button while Windows was installing updates, the system may be left in an inconsistent state.

How to Fix “An Error Occurred While Windows Was Updating”

If the message specifically mentions updating, follow these steps in order. They are safe and do not require advanced technical skills.

  1. Run the Windows Update Troubleshooter. Go to Settings > System > Troubleshoot > Other troubleshooters (Windows 11) or Settings > Update & Security > Troubleshoot (Windows 10). Select “Windows Update” and run it. This tool automatically detects and fixes common issues like corrupted cache or stuck services.
  2. Restart the Windows Update service. Press Win + R, type services.msc, and press Enter. Find “Windows Update”, right-click it, and select “Restart”. Do the same for “Background Intelligent Transfer Service” (BITS).
  3. Clear the update cache manually. Open Command Prompt as administrator (search “cmd”, right-click, Run as administrator). Type the following commands, pressing Enter after each:
    net stop wuauserv
    net stop bits
    rename C:\Windows\SoftwareDistribution SoftwareDistribution.old
    net start wuauserv
    net start bits
    This forces Windows to re-download update files from scratch.
  4. Free up disk space. Use the built-in Disk Cleanup tool (search “Disk Cleanup”) or Storage Sense in Settings to remove temporary files. Aim for at least 10 GB free on the system drive.
  5. Check for system file corruption. In the same administrator Command Prompt, run sfc /scannow. If it finds issues, run DISM /Online /Cleanup-Image /RestoreHealth afterwards. This can take 15-30 minutes.
  6. Try again. After these steps, go to Settings > Windows Update and click “Check for updates”. If it still fails, note the error code and search for it specifically.

What If the Error Appears During Startup or Shutdown?

If you see “an error occurred while Windows was starting” or “shutting down”, the problem is usually a driver or service that hangs. Here is what to try:

  • Boot into Safe Mode. Restart your PC and press F8 (or hold Shift while clicking Restart in Windows) to access Advanced Startup Options. Choose Safe Mode. If the error does not appear in Safe Mode, a third-party driver is the culprit.
  • Uninstall recently installed software or drivers. In Safe Mode, go to Device Manager and look for devices with a yellow exclamation mark. Right-click and uninstall them, then restart normally.
  • Disable fast startup. In Control Panel > Power Options > Choose what the power buttons do, click “Change settings that are currently unavailable”, and uncheck “Turn on fast startup”. This feature can cause shutdown/startup errors on some systems.
  • Use System Restore. If the error started recently, restore your PC to a point before the problem began. Search for “Create a restore point”, open System Properties, and click “System Restore”. Choose a restore point from before the error first appeared.

When the Error Mentions “Creating a Restore Point”

If you see “an error occurred while Windows was creating a restore point”, it usually means System Protection is not functioning correctly. To fix it:

  1. Open System Properties (search “System Protection”).
  2. Select your system drive and click “Configure”.
  3. Make sure “Turn on system protection” is selected.
  4. If it is already on, turn it off, click OK, then turn it back on. This resets the protection settings.
  5. Ensure you have enough disk space allocated (at least 5% of the drive).

If the error persists, it may be caused by a third-party disk cleanup tool that deletes restore points. Check if you have any such tool installed and temporarily disable it.

Is There a Way to Prevent This Error?

While you cannot prevent every possible cause, these habits significantly reduce the likelihood:

  • Keep your system drive clean – regularly delete temporary files and keep at least 15-20% of the drive free.
  • Install updates one at a time – if you have multiple pending updates, install them individually rather than all at once.
  • Avoid forced shutdowns during updates – let updates finish even if they take a long time.
  • Use reliable antivirus – avoid multiple security suites that can conflict with Windows.
  • Create regular restore points manually – this gives you a fallback if something goes wrong.

If you are comfortable with the command line, you can also schedule automatic disk cleanup using the built-in Storage Sense feature in Windows 10/11.

Frequently Asked Questions

What does “an error occurred while Windows was updating” mean?

It means the Windows Update process failed to complete. The error message is generic, so you need to look for an error code or the specific update that failed to diagnose further. Usually, it is a temporary issue that can be fixed by clearing the update cache.

How do I find the exact error code?

Open the error dialog and look for a line that says “Error code:” or “Code:”. It is usually a hexadecimal number like 0x80070002. You can also go to Settings > Windows Update > Update history to see which update failed and its corresponding error code.

Will I lose my files if I run DISM and SFC?

No. These commands only repair system files; they do not touch your personal data. However, it is always a good idea to back up important files before running any system repair tool, just in case.

Why does the error keep coming back after I fix it?

If the error recurs, there is likely an underlying issue that the standard fixes do not address. This could be a failing hard drive, corrupted system registry, or a hardware problem. Run a disk check (chkdsk /f in Command Prompt) and consider a full system reset if the problem persists.

Can I ignore this error if my computer seems to work fine?

You can, but it is not recommended. The error indicates that Windows is not fully updated, which may leave your system vulnerable to security threats. Also, a stuck update can cause other issues over time, such as slow performance or inability to install future updates.

Is there a way to skip the problematic update?

Yes, but it is temporary. In Windows 10/11, you can pause updates for up to 35 days. For a specific update, you can use the “Hide updates” tool (wushowhide.diagcab) to hide it. However, Microsoft eventually forces critical security updates, so it is better to fix the underlying issue.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →