0

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?

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
80154user
  • 3
  • 4

1 Answers1

0

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;
Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992