2
votes

A cmd output can be shown within Inno Setup UI using this solution:
Embedded CMD in Inno Setup installer (show command output on a custom page)

My problem is that I want to execute a batch file in [Run] section (i.e.) after installation.

Also, I want its output to be displayed in Inno Setup UI, but from documentation I see that [Run] will be executed after installation and before final dialog is displayed.

So how can I show a custom page after installation, which will display all the output from the batch executed from [Run] section?

I tried to call the CustomPage setup via BeforeInstall flag in Run section, but the custom page is displayed for a second and then it returns back to Installing page.

How should I approach this?

1

1 Answers

0
votes

It should be enough to call the code from BotonIniciarOnClick from CurStepChanged(ssInstall).

procedure CurStepChanged(CurStep: TSetupStep);
begin
  if CurStep = ssInstall then
  begin
    BotonIniciarOnClick(nil);
  end;
end;

(of course, you better rename the function, as its name now does not make sense – and remove its useless argument)