Releasing Windows file share locks

后端 未结 6 531
醉话见心
醉话见心 2021-02-05 01:57

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

6条回答
  •  长情又很酷
    2021-02-05 02:24

    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.

提交回复
热议问题