Code:
procedure CurStepChanged(CurStep: TSetupStep);
...
if (CurStep = ssPostInstall) then
begin
if not IsDoneError then
begin
#if UseBatch
if FileExists(ExpandConstant('{#BatchFileName}')) then
WizardForm.FilenameLabel.Caption := 'Waiting for batch...';
Exec2(ExpandConstant('{#BatchFileName}'), '', True);
#endif