ITsVISTA
Information that makes life easier when it comes to installing, managing, and using Windows Vista.
Start About FAQ Blogroll Shop

ITsVISTA KB-Link: KB979521

Eror message on a client computer that is running Windows Vista or Windows Server 2008: “ERROR_NOT_LOCKED (158)”

Consider the following scenario in a network environment:

  • You set up a file share on a server that is running Windows Vista or Windows Server 2008.
  • You have a client computer (client 1) that is running Windows Vista or Windows Server 2008.
  • You also have another client computer (client 2) that is running a Windows operating system that is earlier than Windows Vista. For example, you have a client computer that is running Windows XP or Windows Server 2003.
  • You run two applications on client 1. At the same time, you run one application on client 2. All the three applications perform file I/O operations to the file share. For example, these applications may lock part of a file on the file share, edit and then unlock the file.

In this scenario, one of the applications on client 1 fails, and all the other applications stop working.

To monitor the file I/O activity of the three applications, you can use Process Monitor. When you experience this issue, you will find that an error that resembles the following is logged for the affected application:

ERROR_NOT_LOCKED (158)

Process Monitor also indicates that the error occurs in the UnlockFile function.

There is a download that resolves this issue. See Hotfixes for details.
32-bit Download: Contact Microsoft
64-Bit Download: Contact Microsoft

For more information on this issue, including potential causes, workarounds, and resolutions, see: Microsoft KB Article KB979521.

Get notified of new posts for FREE via RSS or E-mail

Subscribe to ITsVISTA!

Related Posts