Is there a way to determine the computer name on which a Microsoft Office document is currently open, and thus locked for editing to other users?

The situation is that we use a network drive to share access to common Microsoft Office documents, typically MS Word documents. Sometimes a document gets left open on a computer creating a locked document situation. Further complicating the matter is the fact that we have a common Microsoft user name that can be used to login to multiple computers concurrently. Thus, it would be helpful to know the computer name on which the document is open, not just the user name.

  • 5
    Sounds like its time to get rid of the common username if its causing you problems. There isn't a way to tell which computer the username is logged into that currently has the file open.
    – Ramhound
    Jun 24, 2013 at 19:41
  • 1
    What about trying a program described on: serverfault.com/questions/109276/…
    – Adam
    Jun 26, 2013 at 17:38
  • You would still have to deal with the shared username issue, but SharePoint is pretty much tailor-made for this type of document sharing.
    – Andrew
    Jul 1, 2013 at 7:12

1 Answer 1


It will be tricky here. Here are the steps

  1. Locate the lock file in the directory, which start at ~$, which can be shown by dir /a
  2. call cacls (lock file name) or cacls ~$* if there is only 1.
  3. It should read Hostname\username if it is an non-domain login user.

The following steps need to run on server with administrator right. (for domain user), but it is no likely that a domain account would be share anyway.

  1. Call NET FILE, then u should find the login name of the actual user.
  2. Call NET SESSION, then u should find where is the user login from.
  • Unfortunately the shared user account is a domain account, and I don't have admin access rights to the server. Despite this, your response is probably the closest thing to a real solution, so I'm going to mark it as the accepted answer.
    – DakotaD
    Jul 8, 2013 at 17:14
  • If that is a share domain account, then what you can do is delete the ~$ lock file to allow others to save the files. although it would be disaster when the left over word (probably 1 month later), the bad guy comes back and press save, then overwrite all the works other have done.
    – user218473
    Jul 9, 2013 at 15:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.