Search This Blog

Thursday, June 22, 2017

How to find who locks a file on Windows - and how to release it if a service is the locker

There used to be a time in which finding who locks a file on a windows system was simple. you typed "net files" (or "net file") and found the culprit. releasing the file was just as simple - "net file ID /close" would do the trick. But that , as the song says, was yesterday.  For some reason, a certain folder is locked in one of the family's computer, and net files claims no file is locked.

Searching the net, I came across this lovely thread on the superuser/stackexchange forum dealing with finding the lockers of locked files on windows, and the wonderful solution I learned about is Microsoft/Sysinternals "Process Explorer".

It is as simple as one could ask: you go to Find handle or Dll, type the path in question, and get a list of the locking programs.

But releasing the lock, at least in the case of services, is another thing. It turned out that my specific locking software was the notorious Windows Media Player Network Sharing Service (better known around the net as wmpnetwk.exe - with little enthusiasm and a lot of criticism).
Process Explorer suggests the possibility of releasing the lock himself. I tried doing that by going to the Handle menu, and there chose "close handle", confirmed killing wmpnetwk, and expected that the lock would be released - to no avail.

There was no alternative than to going to services (fastest way I know these days is to run Taskman - choose services - and press the services button), then go over the services till I reached "Windows Media Player Network Sharing Service" and stopped him. And then, finally, my locked folder was released !




No comments:

Post a Comment