In the Inno Setup wpInstalling
page how can I prevent the initial extraction of the files as defined in the [Files]
section from setting the progress bar to (almost) 100%?
My installation script mainly consists of installing a number of third party installation files from the '[Run]' section. Example below:
[Run]
Filename: "{tmp}\vcredist_x86-2010-sp1.exe"; Parameters: "/q /norestart"; \
Check: InstallVCRedist; \
BeforeInstall: UpdateProgress(10, 'Installing Microsoft Visual C++ 2010 x86 Redistributable - 10.0.40219...');
Filename: "{tmp}\openfire_3_8_1.exe"; Check: InstallOpenFire; \
BeforeInstall: UpdateProgress(25, 'Installing OpenFire 3.8.1...');
Filename: "{tmp}\postgresql-8.4.16-2-windows.exe"; \
Parameters: "--mode unattended --unattendedmodeui none --datadir ""{commonappdata}\PostgreSQL\8.4\data"" --install_runtimes 0"; \
Check: InstallPostgreSQL; \
BeforeInstall: UpdateProgress(35, 'Installing PostgreSQL 8.4...'); \
AfterInstall: UpdateProgress(50, 'Setting up database...');
The installation of these third party components takes longer than any other part of the install (by far) but unfortunately the progress bar goes from 0% to close to 100% during the initial extraction of these files. I then can reset the progress bar to an amount of my choosing by using the following procedure:
procedure UpdateProgress(Position: Integer; StatusMsg: String);
begin
WizardForm.StatusLabel.Caption := StatusMsg;
WizardForm.ProgressGauge.Position :=
Position * WizardForm.ProgressGauge.Max div 100;
end;
Ideally however I'd prefer the initial extraction to instead go from 0–10% (approx.) as that would more closely represent what is actually happening.
Is there any event to capture the progression of the extraction of the files or alternatively a way to prevent or block the extraction of the files from updating the progress bar?