Windows error inside an HRESULT
0x80070020 ERROR_SHARING_VIOLATION
The file is in use by another program, so it cannot be changed right now. Seen as 0x80070020.
Where you will see it
- Windows Update
- Installers
- Backups
Likely causes, most common first
- Antivirus scanning the file.
- A program left running in the background.
- A backup or sync tool holding the file.
How to fix it, in this order
Start with the first fix and check the result before moving on; each one says how to tell that it worked.
1. Restart, then try again before opening other programs (easy)
- Restart the PC.
- Run the update or install first, before starting other apps.
- If it still happens, pause third-party security software for one try.
It worked if: The step completes.
What Microsoft's documentation says
Microsoft's own wording for this code, quoted from the page named under each quote. The plain-English explanation and the fixes above are ours.
“The process cannot access the file because it is being used by another process.”
“Couldn't access the file because it is already in use. This can occur when the installer tries to replace a file that an antivirus, antimalware or backup program is currently scanning.”
“This error is caused by non-Microsoft filter drivers, such as antivirus.”
Microsoft’s fix: retry after a clean boot; if it still fails, record the install with Process Monitor and match the file named in CBS.log to the program holding it.
The same code, written other ways
Search a log or a forum for any of these; they are all this code.
- 0x80070020 (what Windows Update, DISM and installers print)
- -2147024864 (signed decimal, as PowerShell and some logs show it)
- 2147942432 (unsigned decimal)
- Windows error 32 (0x20), the number inside it; net helpmsg 32 prints its message
How the code is put together
Read from the bits as Microsoft's [MS-ERREF] Windows Error Codes specification lays them out.
- Severity: 1 (failure) (bit 31)
- Customer bit: 0 (Microsoft) (bit 29)
- NTSTATUS inside: 0 (bit 28)
- Facility: 7 (FACILITY_WIN32) (bits 16-26)
- Code: 32 (0x20) (bits 0-15)
Codes that often come with it
- 0x80070005 E_ACCESSDENIED
Access was denied: Windows refused permission to a file, folder, registry key or service the operation needed.
More than one code in your log?
Paste the whole CBS, DISM or Windows Update log into the decoder. It lists every code in it, in order, with the line it was on. Decoded in your browser; nothing is sent.
Open the error code decoder →Helping someone with the same problem?
Send them this page, or link to it from a forum reply or your own site.