High Operating Systems ✓ Solution Verified by Community (0+ upvotes)

How to fix error error-sharing-violation in Windows 11

ERROR_SHARING_VIOLATION = 32

65% success rate
👥 0+ users verified
📅 Updated: 2026-08-12
⏱️ 20 min read
Fix based on community reports and expert analysis. Last verified: 2026-08-12 · How we verify fixes
Error Codeerror-sharing-violation
Affected SystemWindows 11 (Microsoft)
DifficultyHigh
Estimated Time20 min
Requires Admin Rights⚠️ Yes

Solution Steps

  1. 1 First, identify which program is locking the file. The error message usually shows the file path. If it's a program you're trying to update, close that program completely. For example, if you're updating a game, close the game launcher (Steam, Epic Games) and any related processes.
  2. 2 Press Ctrl+Shift+Esc to open Task Manager. Go to the 'Processes' tab and look for any processes that might be using the file. For example, if the file is in your OneDrive folder, look for OneDrive. Right-click and select 'End task' to close it.
  3. 3 If you can't find the process, use a free tool called 'Handle' from Microsoft Sysinternals. Download it, open Command Prompt as administrator, and run 'handle.exe -a [file path]' to see which process has the file open. Then close that process.
  4. 4 If the file is locked by a system process, restart your computer. This releases all file locks. After restarting, try the operation again.
  5. 5 If the error occurs during a software installation, try running the installer as administrator. Right-click the installer and select 'Run as administrator'. This gives it the permissions it needs to replace locked files.
  6. 6 As a last resort, use the 'takeown' and 'icacls' commands to take ownership of the file and grant yourself full control. Open Command Prompt as administrator and run: takeown /f "C:\path\to\file" /r /d y, then icacls "C:\path\to\file" /grant administrators:F /t. This forcefully gives you permission to modify the file.

🔍 Didn't work? Enter your GPU and CPU for hardware-specific advice:

🔧 Still having issues?

Describe your exact problem to Error Buddy and get a personalized fix in seconds.

🛠️ Try Error Buddy — It's Free