Inno Setup: Deleting folders after restart during uninstallation

https://stackoverflow.com/questions/61959208/inno-setup-deleting-folders-after-restart-during-uninstallation

To schedule file or directory deletion on restart, call RestartReplace function with DestFile (second) argument set to an empty string ('').

RestartReplace(FileToDelete, '');

For directories, this works, only if they are empty. So you will have to first call RestartReplace for all files inside the directory, which cannot be deleted.

For details, refer to WinAPI function MoveFileEx and its MOVEFILE_DELAY_UNTIL_REBOOT flag, which is behind the Inno Setup RestartReplace function.

 

answered May 23 '20 at 5:35
 

Martin Prikryl

posted on 2021-01-28 14:13  liujx2019  阅读(93)  评论(0编辑  收藏  举报

导航