Имя пользователя:
Пароль:
 

Показать сообщение отдельно

Аватара для doctor_allcome

Новый участник


Сообщения: 32
Благодарности: 0

Профиль | Цитировать


Добрый день! Прошу помощи профессионалов! Имеется тестовый скрипт. При отработке CancelButtonClickFinishedPage срабатывает закрытие процесса, но в Винде, в папке TEMP временные файлы не удаляются. Не могу понять, как заставить программу чистить TEMP по завершению?

Скрытый текст

[Setup]
AppName=My Program
AppVersion=1.5
DefaultDirName={pf}\My Program

[code]
procedure ExitProcess(uExitCode: UINT);
external 'ExitProcess@kernel32.dll stdcall';

function NextButtonClick(CurPage: Integer): Boolean;
begin
Result := True;
// if the fake Finish button was clicked...
if CurPage = wpFinished then
MsgBox('И вот тут Можно запустить программу!', mbInformation, MB_OK);
end;

procedure CancelButtonClickFinishedPage(Sender: TObject);
begin
// display the "Exit Setup ?" message box and if the user selects "Yes",
// then exit the process; it is currently the only way how to exit setup
// process manually
if ExitSetupMsgBox then
ExitProcess(0);
end;

procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID = wpFinished then
begin
WizardForm.NextButton.Caption := 'Run';
WizardForm.CancelButton.Caption := SetupMessage(msgButtonFinish);
WizardForm.CancelButton.Visible := True;
// bind your own OnClick event for the Cancel button; the original one
// is already disconnected at this stage
WizardForm.CancelButton.OnClick := @CancelButtonClickFinishedPage;
end;
end;

Отправлено: 14:10, 13-04-2016 | #1500