Подтвердить что ты не робот

Как запустить файл перед настройкой с помощью Inno Setup

Можно ли запустить файл с помощью Inno Setup до начала установки? Документация

4b9b3361

Ответ 1

Да, это так. В разделе [code] запустите файл в функции InitializeSetup(). В этом примере запускается блокнот до запуска установки.

function InitializeSetup(): boolean;
var
  ResultCode: integer;
begin

  // Launch Notepad and wait for it to terminate
  if Exec(ExpandConstant('{win}\notepad.exe'), '', '', SW_SHOW,
     ewWaitUntilTerminated, ResultCode) then
  begin
    // handle success if necessary; ResultCode contains the exit code
  end
  else begin
    // handle failure if necessary; ResultCode contains the error code
  end;

  // Proceed Setup
  Result := True;

end;