user2687471
user2687471

Reputation: 13

Changing restart message on Inno Setup Prepare To Install page

I am building an installer in Inno Setup v6.2.1 with prerequisites, which include .NET, runtimes, and KB fixes (Windows 7 SP1). The goal is to do potentially several reboots depending on if the machine is missing KBs or .NET etc.

I am able to achieve what I want so far using PrepareToInstall and can change the text by returning the appropriate string. No problems... however I can't find a way of changing the.

Setup must restart your computer. After restarting your computer, run Setup again to complete the installation of xxxxx

Because I am creating a runonce entry, the installer will automatically run after reboot (which it does). The text "run Setup again" is not relevant in my situation and I want to change the text to say that the installer will continue once you restart.

I have tried to find where to change this text but with no success. I assume that PreparingMemo might be the candidate but no luck or not sure how to use it. Any help would be appreciated.

Upvotes: 1

Views: 346

Answers (1)

Martin Prikryl
Martin Prikryl

Reputation: 202118

See Handling and customizing errors and messages in Inno Setup.

This particular message is defined by the PrepareToInstallNeedsRestart message.

You can change it in the [Messages] section:

[Messages]
PrepareToInstallNeedsRestart=Setup must restart your computer. After restarting your computer, the Setup will continue to complete the installation of [name].%n%nWould you like to restart now?

If you need to change the message text dynamically, assign WizardForm.PreparingLabel.Caption. E.g. from CurPageChanged(wpPreparing) event.

Upvotes: 1

Related Questions