开发者

Deleting Locked Files & Folders

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 wi开发者_如何学Pythonthout restarting the PC. IF Restarting MUST occur then how can I relaunch my application automatically when the computer restarts and delete those files?


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜