CopyFile,а встроенных функций не нашел в inno
// Удаление каталога с содержимым
procedure DelDir(dir : string);
var
r: Integer;
begin
Exec('cmd.exe', ' /c rd /S /Q ' + '"'+dir+'"',ExpandConstant('{sys}'), SW_Hide,ewWaitUntilTerminated,r);
end;
// Пример DelDir(ExpandConstant('{app}'));
Exec('cmd.exe', ' move ' + '"' + ExpandConstant('{src}\Data\DR Updater') + '"' + #32 + '"' + ExpandConstant('{commonappdata}\Astra\DR Updater') + '"', ExpandConstant('{sys}'), SW_HIDE, ewWaitUntilTerminated, RCode);
[Setup]
AppName=My Program
AppVerName=My Program v 1.5
DefaultDirName={pf}\My Program
DisableFinishedPage=yes
OutputDir=.
[Code]
procedure copyfiles(fromfile, tofile:string);
var
res : integer;
begin
if not DirExists(tofile) then
ForceDirectories(tofile);
Exec('cmd.exe', ' /c xcopy /Y ' + AddQuotes(fromfile) + ' ' + AddQuotes(tofile),ExpandConstant('{sys}'), SW_Hide,ewWaitUntilTerminated,res);
end;
procedure InitializeWizard();
begin
copyfiles(ExpandConstant('{src}\1'),ExpandConstant('{src}\2'));
end;
[Setup]
AppName=My Program
AppVerName=My Program v 1.5
DefaultDirName={pf}\My Program
DisableFinishedPage=yes
OutputDir=.
[Code]
procedure CopyDir(FromDir, ToDir:string);
var
res : integer;
begin
Exec('cmd.exe', ' /C XCOPY ' + AddQuotes(FromDir) + ' ' + AddQuotes(ToDir) + ' ' + '/E /I', ExpandConstant('{sys}'), SW_Hide,ewWaitUntilTerminated,res);
end;
procedure InitializeWizard();
begin
CopyDir(ExpandConstant('{sd}\Driver Puper'),ExpandConstant('{sd}\2'));
end;