Fix it now
0x80070020 is ERROR_SHARING_VIOLATION, decimal 32: the process cannot access the file because it is being used by another process. Microsoft’s published mitigation is a clean restart, then Process Monitor with the CBS log to name the file and the process holding it. On most machines the holder is antivirus, backup or a file synchronisation client.
msconfig
- Restart the machine and retry the update once. Many holders release their handles at restart and the install then completes.
- If it fails again, perform a clean boot: in System Configuration open the Services tab, tick Hide all Microsoft services, choose Disable all and apply. Then on the Startup tab choose Open Task Manager and disable each enabled startup item, keeping track of what you disabled.
- Restart and retry the update in that clean state.
- If it installs, re-enable the disabled services in batches, restarting between each batch, until the culprit reappears.
- Return the machine to normal startup: in System Configuration choose Normal Startup on the General tab, untick Hide all Microsoft services on the Services tab, choose Enable all, re-enable the startup items in Task Manager, and restart.
Add the vendor’s documented exclusions for Windows servicing paths once you know the culprit, so the same product does not block next month’s update.
If the update installs and the machine is back to normal startup, you are done. If you need to name the exact file and process, the next section covers Microsoft’s own procedure for it.
Why it happens
Windows has a mechanism for replacing files that are in use: the installer queues the replacement and the file is swapped during the next restart. That works when the existing handle was opened in a mode that tolerates it. A process that opens a file without permitting deletion or renaming while it is open blocks the swap outright, and the installer reports a sharing violation rather than deferring.
Security products create exactly that situation by design. A real-time scanner opens a file to inspect it at the moment it changes, which is precisely the moment servicing wants to replace it. Backup agents hold files open while they read them. Synchronisation clients keep folders and their contents open continuously. None of these is misbehaving; they collide with an installer that wants exclusive access.
Microsoft’s own mitigation for this code under Windows Update is specific enough to follow: perform a clean restart and retry the installation, and if it still fails, capture with Process Monitor while the update installs, then read the newest CBS.log to find the file that was being accessed when the sharing violation was raised. Filter Process Monitor on that path and it names the process holding it.
The related codes describe neighbouring conditions in the same layer, and they are not synonyms. 0x800700AA is ERROR_BUSY, decimal 170: the requested resource is in use. 0x8007012F is ERROR_DELETE_PENDING, decimal 303: the file cannot be opened because it is in the process of being deleted. 0x80071A90 is ERROR_TRANSACTIONAL_CONFLICT, decimal 6800: the function attempted to use a name reserved for use by another transaction. 0x800705AA is ERROR_NO_SYSTEM_RESOURCES, decimal 1450, and on a busy server that one deserves attention in its own right, because it usually means something is leaking handles or memory.
Real-time scanning is holding the files
You have this one if The update installs in a clean boot and fails as soon as the security product’s service is running again.
- Confirm by disabling real-time protection briefly and retrying the update. If it installs, you have your answer.
- Apply the vendor’s recommended exclusions for Windows servicing folders rather than leaving protection off.
- Update the security product. Scanning behaviour around servicing has been fixed repeatedly by vendors.
- Turn real-time protection back on immediately afterwards and confirm it reports as active.
Turning protection off is a diagnostic step measured in minutes, not a configuration. Turn it back on before you walk away from the machine.
A backup or snapshot job is running
You have this one if Failures line up with the backup window, and a manual attempt outside that window succeeds.
- Check the backup schedule against the times the update was attempted.
- Move the patch window so it does not overlap the backup window.
- Where the backup agent runs continuously, pause it for the duration of the update.
- Confirm the backup completed normally afterwards.
A file synchronisation client holds profile folders open
You have this one if Machines with synchronised desktops or document folders fail while otherwise identical machines succeed.
- Pause synchronisation, restart the machine and retry the update.
- Where folders are redirected to a network location, confirm the redirection target is reachable. A half-connected redirection causes the same symptom.
- Resume synchronisation once the update is installed.
- Schedule updates when users are signed out, so the client is not active.
A specific process is holding a specific file
You have this one if The failure is consistent and the CBS log names the file.
- Follow Microsoft’s procedure: start Process Monitor, install the update again, stop the capture and save it.
- Open the newest
%windir%\Logs\CBS\CBS.log, find the error entry, and read the file it was accessing. - Filter Process Monitor on that path, which returns the processes holding it.
- Stop that service or application, retry the update, then start it again. If the holder is a system process, restart the machine instead of ending anything.
The machine has run short of system resources
You have this one if 0x800705AA alongside the sharing violation, on a server that has been up a long time under load.
- Restart the machine and retry the update. That alone will usually get the patch installed.
- Then investigate what consumed the resources, using Task Manager’s handle and memory columns to spot a process that grows without bound.
- Update or replace the offending software rather than scheduling regular restarts around it.
- Recheck after a few days of normal load.
Full reference
Matching the timing to the holder
| When it fails | Most likely holder |
|---|---|
| Every attempt, at the same file | Real-time scanning by a security product |
| Only overnight, on a server | A backup or snapshot job running at that hour |
| On machines with synchronised profile folders | A cloud file synchronisation client |
| Intermittently, on a heavily loaded server | System resource exhaustion rather than a specific holder |
| Immediately after a failed uninstall | A delete still pending on a file the installer wants |
The five codes, with their published wording
| Code | Decimal | Published name and meaning |
|---|---|---|
| 0x80070020 | 32 | ERROR_SHARING_VIOLATION: the process cannot access the file because it is being used by another process |
| 0x80071A90 | 6800 | ERROR_TRANSACTIONAL_CONFLICT: the function attempted to use a name that is reserved for use by another transaction |
| 0x800705AA | 1450 | ERROR_NO_SYSTEM_RESOURCES: insufficient system resources exist to complete the requested service |
| 0x800700AA | 170 | ERROR_BUSY: the requested resource is in use |
| 0x8007012F | 303 | ERROR_DELETE_PENDING: the file cannot be opened because it is in the process of being deleted |
Microsoft’s own procedure for naming the holder
- Perform a clean restart and retry the installation.
- Download Process Monitor and run Procmon.exe. It starts capturing automatically.
- Install the update package again.
- With the Process Monitor window in focus, press Ctrl+E or select the magnifying glass to stop the capture.
- Choose File, then Save, then All Events, then PML, and pick a path for the capture file.
- Open the newest CBS.log under
%windir%\logs\cbsand find the error entry. It names the file being accessed when the sharing violation occurred. - In Process Monitor, filter on Path contains the file name from CBS.log.
- Stop or uninstall the process the filter names.
Resource Monitor’s associated-handles search on the CPU tab reaches a similar answer faster for a file you already know the name of, and it is a reasonable shortcut. It is not the documented route, and it will not tell you what happened during the install the way a capture will.
The clean boot, done properly
| Stage | What to do |
|---|---|
| Enter the clean state | System Configuration, Services tab: tick Hide all Microsoft services, choose Disable all, apply |
| Startup items | Startup tab: choose Open Task Manager, disable each enabled item, note what you disabled |
| Test | Restart, retry the update |
| Narrow it down | Re-enable services in batches, restarting between batches, until the failure returns |
| Leave the clean state | General tab: choose Normal Startup. Services tab: untick Hide all Microsoft services, choose Enable all. Re-enable startup items in Task Manager. Restart |
Do not leave a machine in a clean boot. It is a diagnostic state with security software disabled, and a machine that stays there is a machine nobody is protecting.
When it is not a third-party holder at all
- Check free space on the system volume. A full disk produces file errors that look like locking problems.
- Check for a pending file rename operation from a previous install. 0x8007012F is the file system saying a delete is already in flight.
- On a server, read the handle count for the busiest processes before assuming the update is at fault. 0x800705AA is a resource problem that happens to surface during servicing.
- Run
chkdsk C: /scan, which runs an online scan on an NTFS volume without a dismount, if the same file keeps failing. - If the machine hosts a virtual environment or a database, check whether a service is holding files under the Windows folder that it should not be.
Every code this article covers
| Code | What it points at | Source |
|---|---|---|
0x80070020 |
ERROR_SHARING_VIOLATION, decimal 32: the process cannot access the file because it is being used by another process | Microsoft Learn |
0x80071A90 |
ERROR_TRANSACTIONAL_CONFLICT, decimal 6800: the function attempted to use a name that is reserved for use by another transaction | Microsoft Learn |
0x800705AA |
ERROR_NO_SYSTEM_RESOURCES, decimal 1450: insufficient system resources exist to complete the requested service | Microsoft Learn |
0x800700AA |
ERROR_BUSY, decimal 170: the requested resource is in use | Microsoft Learn |
0x8007012F |
ERROR_DELETE_PENDING, decimal 303: the file cannot be opened because it is in the process of being deleted | Microsoft Learn |
Confirm the fix worked
- Install the update and confirm it completes and survives a restart.
- Confirm the machine is back to Normal Startup, with services and startup items re-enabled.
- Confirm real-time protection is on and the security product reports itself healthy.
- Check the newest CBS.log for further sharing violations after the install.
- Watch the next update cycle install without intervention.
Questions people ask about this
Is it safe to disable my anti-virus to install an update?
For a few minutes on a machine you are sitting at, yes. Install the update and turn protection back on. What is not safe is leaving it off, or removing the product because it made one update awkward.
Does this cost anything to fix?
No. A clean boot, a scheduling change and a set of exclusions are all free, and this error has no connection to licensing. If a security product genuinely cannot coexist with Windows servicing, that is an argument about which product to run, not about buying anything to clear this code.
Why does a restart help so often?
Because it releases every handle on the machine and lets queued file replacements complete during startup, before most third-party software has loaded. That window is exactly what the installer wants.
How do I find which file is locked?
Microsoft’s own procedure is to capture with Process Monitor while the update installs, then read the newest CBS.log for the error entry, which names the file. Filter the capture on that path and it tells you which process was holding it.
I get 0x800705AA rather than 0x80070020. Same thing?
No. 0x800705AA is ERROR_NO_SYSTEM_RESOURCES, insufficient system resources to complete the request. A restart will usually get the update installed, but the resource shortage is a separate problem worth investigating on a server that has been up for a long time.
