My installer has a tendency to experience a ~30 second delay on
Preparing to Install wizard page. It happens in 50% of tests and I have even received reports that the number goes up to 100%.
When debugging the setup I can see a line similar to the below around the time of delay:
[07:47:44.590] Found 787 files to register with RestartManager.
It appears as if InnoSetup is running a "file in use check" in this phase. At this point in time, if this is an upgrade, most of the files will be in use anyway. So I found
CloseApplications and set it to
no to no avail. I still see the same delay but no "
Found XYZ files" message anymore.
In the "PrepareToInstall" function I uninstall the previous version automatically (if any) but the "in use check" occurs prior to this.
The noticeable delay seems to coincide with the moment when my setup started deploying a much larger number of files. Is there a way to turn off this behavior? The ~30 second delay without any sensible message is apparently too long.
BTW, I am using the latest InnoSetup 6.2.1. I have also turned off Windows Defender real-time protection during my tests just to make sure this is not affecting the results.