简体   繁体   English

如何停止Windows Server锁定文件?

[英]How to stop Windows server from locking a file?

I have to work with a buggy accounting application that locks the data file and doesnt release the lock when it stops using it. 我必须使用一个错误的会计应用程序来锁定数据文件,并且在停止使用它时不会释放该锁。 So next person trying to access the file gets Access Denied. 因此,下一个尝试访问该文件的人将被拒绝访问。

This can be temporarily fixed by deleting the filelock handle with Unlocker, but it has to be done every time, and is very annoying. 可以通过使用Unlocker删除文件锁句柄来临时解决此问题,但是每次都必须这样做,这很烦人。

Is there a way to configure (Windows 2003 server) to disable file locks on ONE particular file? 有没有一种方法可以配置(Windows 2003服务器)以禁用一个特定文件上的文件锁定? I found some info on how to disable file locks system-wide but I dont want to do this for the whole server, just ONE file. 我找到了一些有关如何在整个系统范围内禁用文件锁定的信息,但是我不想对整个服务器(仅一个文件)执行此操作。

I found that Unlocker provides a command-line interface to run it. 我发现Unlocker提供了一个命令行界面来运行它。 So I created a batch file that runs unlocker and unlocks this file on demand. 因此,我创建了一个运行解锁程序的批处理文件,并根据需要解锁该文件。 Not ideal but its less annoying than other options: 不理想,但比其他选项烦人:

unlocker "C:\\Path\\File.lck" /S /D 解锁器“ C:\\ Path \\ File.lck” / S / D

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM