How can I set the exit code in Inno Setup?

exit-code, inno-setup

Solution

Use:

[Code]
procedure ExitProcess(exitCode:integer);
  external 'ExitProcess@kernel32.dll stdcall';

procedure SomeEventHere();
begin
  if someerror then begin
    ExitProcess(9); //Your custom exit code
  end;
end;

Problem

I want to set the exit code for my installation, this way I will know why the installation was aborted. I'm using Inno Setup.

Original source

Related problems