Archive: deleting file forcibly


deleting file forcibly
Hello friends !

How to write nsis script, to delete a file which is open? Till now i am using "Delete <file>" syntax, with that it is not deleting the opened file. But it is possible, while uninstalling "win amp" software if any of its installation file opened, still it deletes the file successfully.

Help appreciated.


The simple method is to use the /REBOOTOK switch.
The advanced method is to find out if the file is running, close it and delete it. For that you could use either internal instructions like FindWindow IsWindow etc, or a plugin from wiki, for instance FCT plugin.


To find out what process is locking a file or module, use the LockedList plug-in.

Stu