Three little question,, help me please  ..
1. When unninstall, how to delete the main folder of the installer? the folder is empty but still in program files.. i try with deltree in CurUninstallStepChanged, and with [UninstallDelete] and nothing works.
2. Same problem that the fist, but when cancel the installation. This is worst.. because when cancel, the main folder AND subdirectories still there.
3. The shit png in unninstall doest show.. i think i put in the incorrect line, but i'm a little lost..
My unninstall code is this:
Quote:
procedure InitializeUninstallProgressForm;
var
img:Longint;
UnsStatusLabel, UnsGameNameLabel: Tlabel;
begin
FileCopy(ExpandConstant('{app}\Background.png'), ExpandConstant('{tmp}\Background.png'), True);
FileCopy(ExpandConstant('{app}\isskinU.dll'), ExpandConstant('{tmp}\isskinU.dll'), True);
FileCopy(ExpandConstant('{app}\{#Skin}'), ExpandConstant('{tmp}\{#Skin}'), True);
FileCopy(ExpandConstant('{app}\botva2.dll'), ExpandConstant('{tmp}\botva2.dll'), True);
FileCopy(ExpandConstant('{app}\CallbackCtrl'), ExpandConstant('{tmp}\CallbackCtrl'), True);
FileCopy(ExpandConstant('{app}\UninstData.ini'),Ex pandConstant('{tmp}\Setup.ini'),False);
LoadSkinUninst(ExpandConstant('{tmp}\{#Skin}'), '');
with UninstallProgressForm do begin
BorderStyle := bsNone;
AutoScroll := False;
ClientWidth := ScaleX(650);
ClientHeight := ScaleY(400);
Position:= poScreenCenter;
UninstallProgressForm.InnerNotebook.SetBounds(0,0, 650,400);
UninstallProgressForm.OuterNotebook.SetBounds(0,0, 650,400);
Bevel.Hide;
StatusLabel.Hide;
MainPanel.Hide;
WizardSmallBitmapImage.Hide;
CancelButton.Visible:=True;
ProgressBar.SetBounds(ScaleX(185), ScaleY(374), ScaleX(455), ScaleY(15));
UnsStatusLabel:= TLabel.Create(UninstallProgressForm.InstallingPage );
UnsStatusLabel.SetBounds(ScaleX(15), ScaleY(374), ScaleX(200), ScaleY(30));;
UnsStatusLabel.AutoSize:= False;
UnsStatusLabel.WordWrap:= True;
UnsStatusLabel.Transparent:= True;
UnsStatusLabel.Font.Color:= clSilver;
UnsStatusLabel.Font.Size:= 8
UnsStatusLabel.Font.Name := 'Verdana'
UnsStatusLabel.Caption:= 'Estado de la desinstalación:';
UnsStatusLabel.Parent:= UninstallProgressForm.InstallingPage;
UnsGameNameLabel:= TLabel.Create(UninstallProgressForm.InstallingPage );
UnsGameNameLabel.SetBounds(ScaleX(15), ScaleY(6), ScaleX(500), ScaleY(15));
UnsGameNameLabel.AutoSize:= False;
UnsGameNameLabel.WordWrap:= True;
UnsGameNameLabel.Transparent:= True;
UnsGameNameLabel.Font.Color:= clSilver;
UnsGameNameLabel.Font.Size:= 9
UnsGameNameLabel.Font.Name := 'Verdana'
UnsGameNameLabel.Caption:= 'Desinstalando archivos, por favor espere...';
UnsGameNameLabel.Parent:= UninstallProgressForm.InstallingPage;
end;
end;
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
begin
if CurUninstallStep = usUninstall then
begin
DelTree('{app}', True, True, True);
RegDeleteKeyIncludingSubkeys(HKLM, ExpandConstant('Software\{code:GamePublisher}\{cod e:GameName}'));
img:=ImgLoad(UninstallProgressForm.Handle,ExpandCo nstant('{tmp}\Background.png'),10,27,630,335,True, True);
ImgApplyChanges(UninstallProgressForm.Handle);
end;
end;
|
Last edited by Logrim; 03-01-2014 at 07:51.
|