views:

86

answers:

1

Hi!

Is it possible to run a file with Inno Setup, before the setup beginns? Documentation

+2  A: 

Yes it is. In de [code] section run the file in the InitializeSetup() function. This example launches notepad before the setup runs.

[code]
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;
Jan Derk
This is what i needed! Thanks.
user411718

related questions