File In Use - Locked For Editing

We have a Word file residing on a Windows 2008 R2 Standard server that is used by many people in our company.  Every night, one designated person needs to be able to update this file.  Frequently, they try to update it and someone has the file still open on their computer, so the updating person gets the message "File is in use.  XYZ.doc is Locked for Editing by "Smith, John". The person who is trying to update the file does not have administrative access to the Server in order to clear the lock.  I am looking for a way - possibly through a batch file or otherwise - that I can give the updating person the ability to clear the locked file so that they are able to edit it.  By the way, the file ALWAYS reads that it is locked by "Smith, John" no matter which user has it open, making it impossible to find the offending computer.  I prefer that the updating person is able to clear it anyway without having to find a computer and log it off.  Any ideas would be appreciated!
caymansupportAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kyle AbrahamsSenior .Net DeveloperCommented:
From:
https://technet.microsoft.com/en-us/library/cc732037.aspx

net file will get you the list of files.

net file <id> /close will close the file for you.

This would need to be run on the server itself.  I guess you could use PsExec to get around that.

If it's the same file you could use some kind of loop or filter (find?) to get the filename in question, and then if it exists close it.

Hope that helps.
0
Emmanuel AdebayoGlobal Windows Infrastructure Engineer - ConsultantCommented:
I use TASKKILL command in my case by running saving the file below as batch file and schedule this to run on the server everynight. Obviously I used this to force close all open excel.exe file running every night because one or two users did not close it when leaving office.

TASKKILL /S system /F /IM excel.exe /T

regards
0
Guilherme NoguchiCommented:
0
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

caymansupportAuthor Commented:
No luck so far.  When I try running the Net Files command from the server I get "System Error 5 has occurred.  Access is denied".  Microsoft says it may be related to permissions, but I'm logged into the server with Admin rights.  

I also tried the TASKKILL command on the server from a command prompt.  I'm not sure of the syntax for Word but I tried both of these:
TASKKILL /S system /F /IM word.exe /T
TASKKILL /S system /F /IM winword.exe /T
It took a minute to return an error that said "Error: The RPC Server is unavailable".  But the RPC service running and to my knowledge we're not having any DNS issues.  

Unfortunately SharePoint isn't an option since we're part of a large organization with strict controls.
0
Kyle AbrahamsSenior .Net DeveloperCommented:
did you run the command prompt as administrator?

type cmd into run
right click cmd in the results -> run as administrator.
0
Guilherme NoguchiCommented:
openfiles.exe /disconnect /s server2008 /op "c:\my documents\somedoc.doc"

https://technet.microsoft.com/en-us/library/bb490961.aspx
0
caymansupportAuthor Commented:
None of the above worked for me.  I ended up installing an app called "Unlocker" on the server and removing it through that.  Then I converted the doc file to docx and when we point to it now it opens properly. Thanks everyone for your help.
0
caymansupportAuthor Commented:
Actually the eventual solution to this was to run a batch file as a scheduled task at 2:30am.  This runs on the server by an account with Admin rights on the server. The file briefly disables and re-enables the network connection on the server, causing all files which were locked to "unlock".  The person who needs to update the file is informed to do so after 2:30am.  One important consideration is to time the disconnect so it doesn't interfere with backups or other jobs.  The script I'm using is below:

net user administrator /active:yes
netsh interface set interface "Default NIC Controller" DISABLED
netsh interface set interface "Default NIC Controller" ENABLED
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
caymansupportAuthor Commented:
It works.  I would say it was an "A" solution but it isn't ideal since it does involve a network disconnection which may affect other things.  It also is scheduled, so the file can't be unlocked at any time the person wants to unlock it (which is a disadvantage).
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Networking

From novice to tech pro — start learning today.