删除锁定的文件和文件夹

发布于 2024-09-02 17:04:27 字数 146 浏览 4 评论 0原文

我正在编写一个更新某些驱动程序的应用程序。但是,驱动程序“正在使用”,除非重新启动计算机,否则无法删除。

那么我如何编写一个应用程序来删除这些锁定的驱动程序而无需重新启动电脑。如果必须重新启动,那么当计算机重新启动并删除这些文件时,如何自动重新启动我的应用程序?

I am writing an application that updates some drivers. However the drivers are "in use" and can't be deleted unless I restart my computer.

So how can I write an application to delete these locked drivers without restarting the PC. IF Restarting MUST occur then how can I relaunch my application automatically when the computer restarts and delete those files?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

请别遗忘我 2024-09-09 17:04:27

对于 Windows,您可以通过 pinvoking MoveFileEx API(或所述注册表)。

For Windows, you can "schedule" moving/deleting files around on a reboot by pinvoking the MoveFileEx API (Or the registry as described).

小情绪 2024-09-09 17:04:27

如果您可以禁用正在使用驱动程序的硬件,则可能会允许卸载并替换驱动程序。

If you can disable the hardware that's using the drivers, this might allow the driver to be unloaded and replaced.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文