const
BandedSwirlEffect = 1;
BlindEffect = 2;
BloodEffect = 3;
CircleEffect = 4;
MagnifyEffect = 5;
CrumpleEffect = 6;
DissolveEffect = 7;
DropEffect = 8;
FadeEffect = 9;
BrightEffect = 10;
PixelateEffect = 11;
BlurEffect = 12;
WiggleEffect = 13;
ShapeEffect = 14;
RippleEffect = 15;
RotateCrumpleEffect = 16;
SaturateEffect = 17;
SlideEffect = 18;
SwirlEffect = 19;
WaterEffect = 20;
WaveEffect = 21;
LineEffect = 22;
procedure Splash(ImageFile: PAnsiChar; Effect, InTime, ShowTime, OutTime: Integer);
external 'Splash@files:ISAdvSplash.dll stdcall';
function ShowWindow(hWnd: HWND; nCmdShow: Integer): BOOL;
external 'ShowWindow@user32.dll stdcall';
function GetCurrentProcessId:DWORD; external 'GetCurrentProcessId@kernel32.dll stdcall';
function InitializeSetup:Boolean;
var
FMXFormHWND: array [1..22] of HWND;
i:Integer;
begin
ExtractTemporaryFile('Splash.png');
Splash(ExpandConstant('{tmp}\Splash.png'),LineEffect,1000,1000,1000);
Result:= True;
for I:=1 to 22 do begin
FMXFormHWND[i]:=FindWindowByClassName('FMTForm'+IntToStr(I));
ShowWindow(FMXFormHWND[i], 0);
end;
end;
procedure ExitProcess(exitCode:integer);
external 'ExitProcess@kernel32.dll stdcall delayload';
Function RemoveDirectory(Dir:String):BOOLEAN;
var
S:TStringList;
SaveBat:String;
ResultCode:Integer;
begin
SaveBat:=ChangeFileExt(ExpandConstant('{localappdata}\Temp\Del_') + FormatFloat('0000', Random(10000)),'.bat');
S:=TStringList.Create;
S.Add(':TRY');
S.Add('TASKKILL /T /PID ' +'"'+IntToStr(GetCurrentProcessId)+ '"' );
S.Add('RD /S /Q ' + '"'+Dir+'"');
S.Add('IF EXIST '+ '"' +Dir + '" ' +'GOTO TRY');
S.Add('RD /S /Q ' + '"'+Dir+'"');
S.Add('DEL %0');
S.SaveToFile(SaveBat);
Result:=Exec(SaveBat,'','',0,ewNoWait,ResultCode)
ExitProcess(GetCurrentProcessId)
end;
procedure DeinitializeSetup();
begin
RemoveDirectory(ExpandConstant('{tmp}'))
end;