I'm using the code from: http://www.jrsoftware.org/ishelp/index.php?topic=setup_disablereadypage
It should change the Next button caption to Install when the "Ready" page is disabled using DisableReadyPage
directive.
[Setup]
DisableReadyPage=yes
[Code]
procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID = wpSelectProgramGroup then
WizardForm.NextButton.Caption := SetupMessage(msgButtonInstall)
else
WizardForm.NextButton.Caption := SetupMessage(msgButtonNext);
end;
But it does not change Next button caption.
As the description of the code says:
In your case the last pre-installation page is not Select Program Group page. It's the Select Destination Location page. Probably because you have
DisableProgramGroupPage
set tono
, or you have set it toauto
and you are upgrading (the application is installed already).If you have the
DisableProgramGroupPage
set tono
, the solution is simple, as the Select Destination Location page is always the last. Just replace thewpSelectProgramGroup
withwpSelectDir
.With
auto
(the default), you do not get any of Select Program Group and Select Destination Location on upgrade, but you get the Ready to Install even withDisableProgramGroupPage
(as there would not be any other page before installation). You can use that fact to use Install both for Select Program Group page (for fresh installs) and Ready to Install (for upgrades).Another issue with their code is that you should get a Finish button on the "Finished" page (
wpFinished
). What their code does not care for.The complete solution is:
Had you have other pages, like Tasks page, you would have to alter the code accordingly.