I use the below command to delete some files after reboot the machine:
MoveFileEx(PChar(File_Address), Nil, MOVEFILE_DELAY_UNTIL_REBOOT);
How can i cancel execution of this command and prevent files from deleting after reboot?
Files you enqueue for deletion this way are placed in the registry under HKLM\System\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations
. Perhaps you can delete entries from there, to prevent the files from being deleted. I couldn't find an API function for this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With