How to run a file before setup with Inno Setup

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

Answers


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

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;

Need Your Help

wxPython 3.0.2.0 installation not working

python installation wxpython

I am trying to install wxPython 3.0.2.0 from source. When I run $ sudo python setup.py install, I get the following error message (part of output shown). System is 32-bit Edubuntu 12.04.

OpenGL: UV values not interpolating in fragment shader

opengl glsl texture-mapping texture2d

I've been trying to convert some old OpenGL code over to use shaders, and I've run into a problem getting my fragment shader to draw a texture on a cube. However, all I see is a grey cube instead. ...