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

How to fix error error-lock-failed in Windows 11

ERROR_LOCK_FAILED = 167

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

Solution Steps

  1. 1 First, identify which file or resource is locked. The error message usually includes the file path. If not, check the application's logs. Once identified, try to close any programs that might be using that file. Use Task Manager (Ctrl+Shift+Esc) to see running processes and end any that might be holding the lock.
  2. 2 If the file is on a network drive, ensure you have the correct permissions. Right-click the file in File Explorer, select 'Properties', go to the 'Security' tab, and check your user account has 'Full control' or at least 'Read/Write' permissions. If not, click 'Edit' and grant yourself the necessary permissions.
  3. 3 Check if the file is read-only. Right-click the file, select 'Properties', and uncheck 'Read-only' if it's checked. This can prevent locking.
  4. 4 If the error is from a specific application, try running it as administrator. Right-click the executable and select 'Run as administrator'. This gives it higher privileges to lock files.
  5. 5 Temporarily disable your antivirus software to see if it's interfering. Right-click the antivirus icon in the system tray and select 'Disable' or 'Pause protection'. If the error goes away, add an exception for the file or application in your antivirus settings.

🔍 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