Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 without restarting the PC. IF Restarting MUST occur then how can I relaunch my application automatically when the computer restarts and delete those files?

like image 866
Cocoa Dev Avatar asked May 24 '10 14:05

Cocoa Dev


1 Answers

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

like image 109
Alex K. Avatar answered Sep 27 '22 18:09

Alex K.