Lỗi 0x80070020 (ERROR_SHARING_VIOLATION) thường xảy ra khi Windows Update không thể cài đặt vì một file đang bị chương trình khác chiếm dụng. Đây là lỗi phổ biến trên Windows 11. Dưới đây là cách khắc phục hiệu quả nhất theo thứ tự.
1. Khởi động lại máy tính
Đây là cách đơn giản nhưng giải quyết được nhiều trường hợp:
- Restart máy tính hoàn toàn.
- Sau khi khởi động xong, vào Settings → Windows Update → Check for updates thử lại.
2. Chạy Windows Update Troubleshooter
- Nhấn Windows + I mở Settings.
- Chọn System → Troubleshoot → Other troubleshooters.
- Tìm Windows Update → nhấn Run.
- Để Windows tự động quét và sửa lỗi.

3. Khởi động lại các dịch vụ Windows Update
- Nhấn Windows + R, gõ services.msc rồi Enter.
- Tìm và khởi động lại (Restart) các service sau:
- Windows Update
- Background Intelligent Transfer Service (BITS)
- Cryptographic Services
- Đặt Startup type của chúng thành Automatic.

4. Reset Windows Update Components (Cách hiệu quả cao nhất)
Mở Command Prompt với quyền Administrator:
- Nhấn Windows + S, gõ cmd, chuột phải → Run as administrator.
- Gõ lần lượt các lệnh sau (Enter sau mỗi lệnh):
cmd
net stop wuauserv
net stop cryptSvc
net stop bits
net stop msiserver
ren C:\Windows\SoftwareDistribution SoftwareDistribution.old
ren C:\Windows\System32\catroot2 Catroot2.old
net start wuauserv
net start cryptSvc
net start bits
net start msiserver
- Khởi động lại máy và thử cập nhật lại.

5. Chạy SFC và DISM
- Mở Command Prompt (Admin).
- Gõ lần lượt:
cmd
DISM /Online /Cleanup-Image /RestoreHealth
sfc /scannow
- Khởi động lại máy.
6. Các cách khắc phục nâng cao
- Tắt tạm thời Antivirus (Windows Defender hoặc phần mềm thứ ba).
- Sử dụng Windows Update Assistant tải trực tiếp từ Microsoft.
- Nếu vẫn không được, thử Network Reset hoặc Repair Windows.
