
26-04-2017, 08:20
|
|
Registered User
|
|
Join Date: Nov 2014
Location: Digital world
Posts: 112
Thanks: 609
Thanked 65 Times in 41 Posts
|
|
You may try this
Quote:
Originally Posted by Sebazz
i have a problem. Actually i use wpi installer by razor, but in the instalation during extraction files, when i click to cancel the program closes but not delete the extracted files (only when appear some error). Also, when i use pzlib v3, the setup not closes the program, it keep running in task manager and the instalation not be canceled. How to fix this ?. I need to add some code to my scrip ? Thanks
|
Hi,
I didn't use WPI.
But You may try this code.! It may be helpfull.
Under cancelbutton click section You need to add this.
Quote:
procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
var
ResultCode: Integer;
begin
SuspendProc;
Confirm:=False;
if ShowCancelBox = mrYes then
Cancel:=True
else
Cancel:=False;
if Cancel then
InstallLabel4.Caption:='Rolling back changes...';
if CurPageID=wpInstalling then
begin
if Cancel then
begin
ISDoneError:=True;
ISDoneCancel:=1;
WizardForm.CancelButton.Enabled:=False;
ButtonSetEnabled(NextBtn,False);
Exec(ExpandConstant('{sys}\taskkill.exe'), ' /F /IM pZLib.exe', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
DelTree(ExpandConstant('{app}'), True, True, True);
end;
end;
ResumeProc;
end;
|
|