I do not know if I understand correctly, but since the game do not think so ... but what I understand is this (create a bat file in .iss)
Code:
[Setup]
AppName=Bat
AppVername=Bat
DefaultDirName={pf}\Bat
[code ]
var
List: TStringList; batfile: string; res: Integer;
CreateBatBtn:TButton;
procedure CreateFileBat(Sender: TObject);
begin
batfile:= ExpandConstant('{src}\Compress.bat');
List:= TStringList.Create;
List.Add('@echo off');
List.Add('echo. Transformers Devastation');
List.Add('echo. x 1 DVD5');
List.Add(':Data1');
List.Add('set arc=Data1.cab');
List.Add('if exist .\TRANSF_1\%arc% goto Data2');
List.Add('echo.Creating %arc%, please wait...');
List.Add('echo.');
List.Add('echo.--------------------------------------------------------------------');
List.Add('arc a -ep1 -r -w.\ -msrep [email protected] [email protected] -dp"%choice%" .\TRANSF_1\%arc%');
List.Add('if ERRORLEVEL 1 goto arcfail');
List.Add('pause');
List.SaveToFile(batfile);
List.Free;
if Exec(batfile, '', '', SW_SHOW, ewNoWait, Res) then MsgBox('Bat Created', mbInformation, MB_OK);
end;
procedure InitializeWizard();
begin with WizardForm do begin
InnerNotebook.Hide;
OuterNotebook.Hide;
CancelButton.Left:=-Left;
NextButton.Left:=-Left;
CreateBatBtn := TButton.Create(WizardForm);
with CreateBatBtn do begin
Caption := 'Create Bat';
Parent := WizardForm;
SetBounds(420,327,60,25)
onclick:=@CreateFileBat;
end
end;
end;
procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
Confirm := False;
end;