I have application with Inno Setup installer. Application is running on background. This means, when I upgrade application (installing new version over old one), I need installer to close this application, so all files might be replaced gracefully.
But it seems, that sometimes it fails to close application for some unknown reason. To get reason, I'd like to log it. The problem is, that since installer can't replace files, user gets error message, which stops installer from finishing. And Inno Setup writes log only after successfully finishing installation.
The actual question is - is last statement correct, or is there a way to configure Inno Setup installer, so it will create log file even on aborted installation? I have idea to make my very own manual log file, which will be created on installation start, and updated every time some method is executed, but I don't want to reinvent wheel.