This problem crops up every now and then at work. Our build machine can have it\'s files accessed via a normal windows file share. If someone browses a folder remotely on the ma
The way i do it is by using both OpenFiles.exe and Handle.exe You can run them in any order and you will have your resource fully unlocked.
OpenFiles: to disconnect File Sharing sessions
Handle.exe: to release any open handles (don't try to close handles belonging to pid4, since that's the system process)
You can automate this by using powershell, batch, or any language of your choice.