Archive: Delete on reboot, not now.


Delete on reboot, not now.
Hello!

Is there any way to mark a file to be deleted on reboot without deleting it now? I tried to mark the file as readonly before deleting with the /REBOOTOK parameter. But it got deleted anyway.

I have the following main reason for wanting to do this:
My application has some indexing files which contains lists of the other files installed (these lists change dynamically). Suppose, during uninstallation, that some files cannot be deleted. I then want to mark these files to be deleted on reboot. In this case I also want to mark the indexing files to be deleted on reboot without actually deleting them now. This is for the following reason: Deletion on reboot may not work for various reasons. If it does not work I would rather like the indexing files to remain back together with the undeletable files. Because this allows the undeleteable files to be deleted later, for example if the user reinstalls at the same location.


You can open the file using FileOpen with "a" mode. That should keep it locked. Just don't forget to close it after you try to delete it.


Okay, thanks. Well I thought about that, but I will not say its very elegant ;-) And I am not sure it will work on win 9x, but maybe it will.. Thanks anyway.