I am new to Inno Setup, so I am grateful for the sample script that Xojo provides in the Xojo Documentation, “User Guide: Inno Setup Script (32-bit apps)”. The sample script worked perfectly for the installation of my desktop app in Windows 11 (I am a Microsoft Windows Beta Tester).
My issue is with the uninstall program that the sample script creates. The Inno Setup Uninstaller does not delete the “Libs” folder in the application directory, containing the DLLs, that was created by the installer. This leaves the end user with the unpleasant task of having to manually delete the Libs folder and the application folder.
I am assuming that the uninstaller did not delete the Libs folder because the DLLs in the folder were running at the time of the uninstall.
The Inno Setup Documentation discusses a procedure named “UnloadDLL”, however it also remarks that “if you attempt to call a function in a DLL that has been unloaded, the DLL will be re-loaded”.
Is there a way, in Inno Setup, to loop through the active DLLs in the Libs folder, unload them and finally delete them, so that the uninstall program can properly delete the Libs folder and the application folder?