Johny777,
тебя ничего не смущает?
Код:
![Выделить весь код](images/misc/selectcode.png)
procedure CurStepChanged(CurStep: TSetupStep);
var
Res: Integer;
s1, s2, s3, s4, s5: string;
begin
if CurStep = ssPostInstall then
begin
if Zip_CheckBox.Checked = true then
begin
s2 := Addquotes(Zip_Path_Edit.Text);
//s2 := Addquotes(ExpandConstant('{tmp}\saved.exe'));
s3 := Addquotes(ExpandConstant('{tmp}\{#Save_Folder}'));
MsgBox('Пути архивации' + #13#10 + 'a -sfx7z.sfx -mx3' + ' ' + s2 + ' ' + s3, mbInformation, MB_OK);
//s3 := Addquotes(RemoveBackslashUnlessRoot(ExpandConstant('{tmp}\{#Save_Folder}')))+'saved.exe';
ExtractTemporaryFile('7za.exe');
ExtractTemporaryFile('7z.sfx');
Exec(ExpandConstant('{tmp}\7za.exe'), 'a -sfx7z.sfx -mx3' + ' ' + s2 + ' ' + s3, ExpandConstant('{tmp}'), SW_SHOW, ewWaitUntilTerminated, Res);
if not (FileCopy(ExpandConstant('{tmp}\saved.exe'), ExpandConstant('{userdesktop}\saved.exe'), True)) then
//if not (FileCopy(ExpandConstant('{tmp}\saved.exe'), 'C:\saved.exe', True)) then
MsgBox('тут кроется лажа, тк не копируется', mbInformation, MB_OK);
end;
end;
end;
второе: для копирования лучше использовать не встроенные функции инно а комстроку
Код:
![Выделить весь код](images/misc/selectcode.png)
procedure copy1file(fromfile, tofile:string);
begin
Exec('cmd.exe', ' /c copy /Y /V /B ' + AddQuotes(fromfile) + ' ' + AddQuotes(tofile),ExpandConstant('{sys}'), SW_Hide,ewWaitUntilTerminated,res);
end;
Вот сейчас твой архив saved.exe скопировался на рабочий стол но инсталлер написал что нет