парни помогите с этим скриптом
мне нужно что бы было только портативная распаковка
Код:

const
DI_NORMAL = 3;
var
MyNewPage: TWizardPage;
Rect: TRect;
HIcon: LongInt;
AIconFileName: String;
MyRadioBtn_1, MyRadioBtn_2: TNewRadioButton;
function GetModuleHandle(lpModuleName: LongInt): LongInt; external 'GetModuleHandleA@kernel32.dll stdcall';
function ExtractIcon(hInst: LongInt; lpszExeFileName: AnsiString; nIconIndex: LongInt): LongInt; external 'ExtractIconA@shell32.dll stdcall';
function DrawIconEx(hdc: LongInt; xLeft, yTop: Integer; hIcon: LongInt; cxWidth, cyWidth: Integer; istepIfAniCur: LongInt; hbrFlickerFreeDraw, diFlags: LongInt): LongInt;external 'DrawIconEx@user32.dll stdcall';
function DestroyIcon(hIcon: LongInt): LongInt; external 'DestroyIcon@user32.dll stdcall';
function IsChecked: Boolean;
begin
Result:= MyRadioBtn_2.checked;
end;
procedure RadBtnOnClick(Sender: TObject);
begin
case Sender of
MyRadioBtn_1: begin
WizardForm.Caption:= FmtMessage(ExpandConstant('{cm:Extracted}'), [ExpandConstant('{#SetupSetting("AppName")}')]);
WizardForm.SelectDirLabel.Caption:= FmtMessage(ExpandConstant('{cm:ExtractedFolder3}'), [ExpandConstant('{#SetupSetting("AppName")}')]);
end;
MyRadioBtn_2: begin
WizardForm.Caption:= FmtMessage(SetupMessage(msgSetupWindowTitle), [ExpandConstant('{#SetupSetting("AppName")}')]);
WizardForm.SelectDirLabel.Caption:= FmtMessage(ExpandConstant('{cm:ExtractedFolder4}'), [ExpandConstant('{#SetupSetting("AppName")}')]);
end;
end;
end;
procedure GetInstTypePage();
begin
MyNewPage:= CreateCustomPage(wpWelcome, ExpandConstant('{cm:HeaderLabelPage}'), ExpandConstant('{cm:LabelPage}'));
try
// в конкретном примере из этого файла (C:\Windows\System32\shell32.dll) берём иконки, для пробного показа.
// Можно использовать обычные .ico
AIconFileName:= ExpandConstant('{sys}\shell32.dll');
//
Rect.Left:= 0;
Rect.Top:= 0;
Rect.Right:= 32;
Rect.Bottom:= 32;
hIcon:= ExtractIcon(GetModuleHandle(0), AIconFileName, 26);
try
with TBitmapImage.Create(WizardForm) do begin
Left:= ScaleX(15);
Top:= ScaleY(68);
Width:= 32;
Height:= 32;
with Bitmap do begin
Width:= 32;
Height:= 32;
Canvas.Brush.Color:= clBtnFace;
Canvas.FillRect(Rect);
DrawIconEx(Canvas.Handle, 0, 0, HIcon, 32, 32, 0, 0, DI_NORMAL);
end;
Parent:= MyNewPage.Surface;
end;
finally
DestroyIcon(hIcon);
end;
hIcon:= ExtractIcon(GetModuleHandle(0), AIconFileName, 19);
try
with TBitmapImage.Create(WizardForm) do begin
Left:= ScaleX(15);
Top:= ScaleY(138);
Width:= 32;
Height:= 32;
with Bitmap do begin
Width:= 32;
Height:= 32;
Canvas.Brush.Color:= clBtnFace;
Canvas.FillRect(Rect);
DrawIconEx(Canvas.Handle, 0, 0, HIcon, 32, 32, 0, 0, DI_NORMAL);
end;
Parent:= MyNewPage.Surface;
end;
finally
DestroyIcon(hIcon);
end;
except
end;
with TNewStaticText.Create(WizardForm) do begin
Width:= WizardForm.InnerNotebook.Width;
Height:= ScaleY(26);
WordWrap:= True;
Caption:= ExpandConstant('{cm:PageTextHeader}');
Parent:= MyNewPage.Surface;
end;
MyRadioBtn_1:= TNewRadioButton.Create(WizardForm);
with MyRadioBtn_1 do begin
Top:= ScaleY(50);
Width:= ScaleX(150);
Caption:= ExpandConstant('{cm:MyRadioCaption_1}');
OnClick:= @RadBtnOnClick;
Parent:= MyNewPage.Surface;
end;
with TNewStaticText.Create(WizardForm) do begin
Left:= ScaleX(60);
Top:= ScaleY(68);
Width:= WizardForm.InnerNotebook.Width - ScaleX(60);
Height:= ScaleY(26);
WordWrap:= True;
Caption:= ExpandConstant('{cm:MyText_1}');
Parent:= MyNewPage.Surface;
end;
MyRadioBtn_2:= TNewRadioButton.Create(WizardForm);
with MyRadioBtn_2 do begin
Top:= ScaleY(120);
Width:= ScaleX(150);
Caption:= ExpandConstant('{cm:MyRadioCaption_2}');
Checked:= True;
OnClick:= @RadBtnOnClick;
Parent:= MyNewPage.Surface;
end;
with TNewStaticText.Create(WizardForm) do begin
Left:= ScaleX(60);
Top:= ScaleY(138);
Width:= WizardForm.InnerNotebook.Width - ScaleX(60);
Height:= ScaleY(26);
WordWrap:= True;
Caption:= ExpandConstant('{cm:MyText_2}');
Parent:= MyNewPage.Surface;
end;
end;
function ShouldSkipPage(PageID: Integer): Boolean;
begin
if (PageID > wpSelectDir) and (PageID < wpInstalling) and (MyRadioBtn_1.Checked) then
Result:= True;
end;
procedure InitializeWizard();
begin
GetInstTypePage();
WizardForm.DiskSpaceLabel.Hide;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
if not IsChecked then begin
case CurPageID of
wpSelectDir: begin
WizardForm.Caption:= FmtMessage(ExpandConstant('{cm:Extracted}'), [ExpandConstant('{#SetupSetting("AppName")}')]);
WizardForm.PageNameLabel.Caption:= ExpandConstant('{cm:ExtractedFolder}');
WizardForm.PageDescriptionLabel.Caption:= FmtMessage(ExpandConstant('{cm:ExtractedFolder2}'), [ExpandConstant('{#SetupSetting("AppName")}')]);
WizardForm.SelectDirLabel.Caption:= FmtMessage(ExpandConstant('{cm:ExtractedFolder3}'), [ExpandConstant('{#SetupSetting("AppName")}')]);
if IsChecked then
WizardForm.DirEdit.Text := ExpandConstant( '{pf}\{#SetupSetting("AppName")}' ) else
WizardForm.DirEdit.Text := ExpandConstant( '{src}\{#SetupSetting("AppName")}' );
end;
wpInstalling: begin
WizardForm.PageNameLabel.Caption:= ExpandConstant('{cm:Installing}');
WizardForm.PageDescriptionLabel.Caption:= FmtMessage(ExpandConstant('{cm:InstallingLabel}'), [ExpandConstant('{#SetupSetting("AppName")}')]);
end;
wpFinished: begin
WizardForm.FinishedHeadingLabel.Caption:= FmtMessage(ExpandConstant('{cm:FinishedHeadingLabel}'), [ExpandConstant('{#SetupSetting("AppName")}')]);
WizardForm.FinishedLabel.Caption:= FmtMessage(ExpandConstant('{cm:FinishedLabelNoIcons}'), [ExpandConstant('{#SetupSetting("AppName")}')]);
end;
end;
end;
end;