Skip to content
⌘ NSIS Forum Archive

deleting file forcibly

3 posts

mahesh1203#

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.
Red Wine#
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.