Довольно трудоемкий, в плане заполнения, но достаточно надежный по моему мнению, пример:
Добавлено через 25 минут
Вариант с файл-листом:
пример файл-листа:
Код:
procedure DeleteWav;
var
i:integer;
DelList:TStringList;
begin
DelList:=TStringList.Create;
DelList.Add('1.wav');
DelList.Add('2.wav');
DelList.Add('3.wav');
DelList.Add('4.wav');
DelList.Add('5.exe');
DelList.Add('6.wav');
DelList.Add('7.wav');
DelList.Add('8.wav')
DelList.Add('9.wav')
DelList.Add('10.wav')
DelList.Add('11.wav')
DelList.Add('12.wav');
DelList.Add('13.wav');
DelList.Add('14.wav');
DelList.Add('15.wav');
DelList.Add('16.wav');
DelList.Add('17.wav');
for i:=0 to DelList.Count-1 do begin
DelTree(ExpandConstant('{app}\')+DelList.Strings[i],False,True,False)
end;
DelList.Free;
end;
procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep = ssDone then DeleteWav;
end;
Добавлено через 25 минут
Вариант с файл-листом:
Код:
procedure DeleteWav;
var
i:integer;
DelList:TStringList;
begin
DelList:=TStringList.Create;
if FileExists(ExpandConstant('{tmp}\FileList.txt')) then begin
DelList.LoadFromFile(ExpandConstant('{tmp}\FileList.txt'));
for i:=0 to DelList.Count-1 do
DelTree(DelList.Strings[i],False,True,False);
end;
DelList.Free;
end;
procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep = ssDone then DeleteWav;
end;
D:\Program Files\ISDone\main\video\ac130_load.wav
D:\Program Files\ISDone\main\video\Aftermath_load.wav
D:\Program Files\ISDone\main\video\Airlift_load.wav
D:\Program Files\ISDone\main\video\airplane_load.wav
D:\Program Files\ISDone\main\video\Ambush_load.wav
D:\Program Files\ISDone\main\video\Armada_load.wav
D:\Program Files\ISDone\main\video\Blackout_load.wav
D:\Program Files\ISDone\main\video\bog_a_load.wav
D:\Program Files\ISDone\main\video\bog_b_load.wav
D:\Program Files\ISDone\main\video\cargoship_load.wav
D:\Program Files\ISDone\main\video\coup_load.wav
D:\Program Files\ISDone\main\video\filelist.bat
D:\Program Files\ISDone\main\video\FileList.txt
D:\Program Files\ISDone\main\video\hunted_load.wav
D:\Program Files\ISDone\main\video\icbm_load.wav
D:\Program Files\ISDone\main\video\jeepride_load.wav
D:\Program Files\ISDone\main\video\killhouse_load.wav
D:\Program Files\ISDone\main\video\launchfacility_a_load.wav
D:\Program Files\ISDone\main\video\launchfacility_b_load.wav
D:\Program Files\ISDone\main\video\scoutsniper_load.wav
D:\Program Files\ISDone\main\video\sniperescape_load.wav
D:\Program Files\ISDone\main\video\village_assault_load.wav
D:\Program Files\ISDone\main\video\village_defend_load.wav
D:\Program Files\ISDone\main\video\Aftermath_load.wav
D:\Program Files\ISDone\main\video\Airlift_load.wav
D:\Program Files\ISDone\main\video\airplane_load.wav
D:\Program Files\ISDone\main\video\Ambush_load.wav
D:\Program Files\ISDone\main\video\Armada_load.wav
D:\Program Files\ISDone\main\video\Blackout_load.wav
D:\Program Files\ISDone\main\video\bog_a_load.wav
D:\Program Files\ISDone\main\video\bog_b_load.wav
D:\Program Files\ISDone\main\video\cargoship_load.wav
D:\Program Files\ISDone\main\video\coup_load.wav
D:\Program Files\ISDone\main\video\filelist.bat
D:\Program Files\ISDone\main\video\FileList.txt
D:\Program Files\ISDone\main\video\hunted_load.wav
D:\Program Files\ISDone\main\video\icbm_load.wav
D:\Program Files\ISDone\main\video\jeepride_load.wav
D:\Program Files\ISDone\main\video\killhouse_load.wav
D:\Program Files\ISDone\main\video\launchfacility_a_load.wav
D:\Program Files\ISDone\main\video\launchfacility_b_load.wav
D:\Program Files\ISDone\main\video\scoutsniper_load.wav
D:\Program Files\ISDone\main\video\sniperescape_load.wav
D:\Program Files\ISDone\main\video\village_assault_load.wav
D:\Program Files\ISDone\main\video\village_defend_load.wav