I have an Inno Setup install that execute some time consuming \'AfterInstall\' action. And while this action is executed, install GUI is completely frozen (seems it\'s main
There are two ways to improve the experience (they are different from an API point of view only, internally both do the same – they pump a Windows message queue):
Use TOutputProgressWizardPage to present an operation progress. Its SetProgress method internally calls VCL TApplication.ProcessMessages, which pumps Windows message queue.
Use CreateOutputProgressPage to create the page.
Some examples:
Explicitly pump the Windows message queue by calling WinAPI DispatchMessage.
For some examples, see AppProcessMessage function in:
In both cases, you have to add calls that trigger the message queue pumping. Usually within some loop that does the processing.
In some cases, you won't be able to do that. For example, when you use a blocking call to an external application (e.g. using Exec or ShellExec) to do the processing. You can workaround that by scheduling a timer that will be regularly triggered, while the function is running.
This approach is used by some examples linked above, namely: