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.
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;