问题
I am using restartreplace
flag to replace the locked file, so it will prompt a message at the end of the installation to restart the machine. But I don't want to display it, and it should be set to restart later by default. Is there any way?
回答1:
You can hide Yes/No restart radio buttons. And update the screen text accordingly.
procedure CurPageChanged(CurPageID: Integer);
var
S: string;
begin
if CurPageID = wpFinished then
begin
WizardForm.YesRadio.Visible := False;
WizardForm.NoRadio.Visible := False;
WizardForm.NoRadio.Checked := True;
S := SetupMessage(msgFinishedLabelNoIcons);
StringChangeEx(S, '[name]', 'My Program', True);
WizardForm.FinishedLabel.Caption := S;
WizardForm.AdjustLabelHeight(WizardForm.FinishedLabel);
end;
end;
来源:https://stackoverflow.com/questions/63424813/avoid-restart-prompt-in-inno-setup