0

I'm trying to create a custom message box saying something like "Loading" or "Extracting" during the Extraction of temporary files in InnoSetup. Is this possible? If not, please come up with suggestions on how I can proceed.

I'm extracting the files temporarily because the files are installers. Otherwise, I would have to extract them into for example documents, run them, and then remove them after my installer is finished.

After extraction, I'm using a batch file to run the different installers from tmp.

Anyway, what I'm struggling with is that After I've created a Form and a label for that form, the label is displayed first when the "ExtractTemporaryFiles" is finished.

This is my code:

`[Code]

var 
  ResultCode: Integer;
  Form: TSetupForm;
  Label1: TLabel;
function InitializeSetup: Boolean;
begin
    Form := CreateCustomForm;
    Form.ClientWidth := ScaleX(500);
    Form.ClientHeight := ScaleY(500);
    Form.Caption := 'Loading.. ';

    Label1 := TLabel.Create(Form);
    Label1.Parent := Form;
    Label1.Caption := 'Extracting.. ';
    Label1.Left := ScaleX(16);
    Label1.Top := ScaleY(16);
    Label1.Width := ScaleX(224);
    Label1.Height := ScaleY(32);
    Form.show()
end;
end;

procedure DeinitializeSetup;
begin
  Form.showModal()
  ExtractTemporaryFiles('{app}\*');
  if Exec(ExpandConstant('{tmp}\')+'{app}\runAll2.bat', 'runascurrentuser', '',SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode) then begin
      MsgBox('Finished! Press ok', mbError, MB_OK)
    end 
    else begin
     MsgBox('Something went wrong! Press ok', mbError, MB_OK)
end; 
end;`

Can you please help me out guys?

//InnoSetup noob :)

0 Answers0