Код:

; Скрипт создан через Мастер Inno Setup Script.
; ИСПОЛЬЗУЙТЕ ДОКУМЕНТАЦИЮ ДЛЯ ПОДРОБНОСТЕЙ ИСПОЛЬЗОВАНИЯ INNO SETUP!
#define MyAppName "AIDA64"
#define MyAppVersion "2.85.2400"
#define MyAppPublisher "Copyright (c) 1995-2013 FinalWire Ltd."
#define MyAppURL "http://www.aida64.com/"
#define AIDA641 "AIDA64 Extreme Edition"
#define AIDA642 "AIDA64 Business Edition"
#define AIDA64EXE1 "aida64.exe"
#define AIDA64EXE2 "aida64.exe"
#define AuthRep "Xabib"
#include "WinTB.iss"
#include "botva2.iss"
[Setup]
; Примечание: Значение AppId идентифицирует это приложение.
; Не используйте одно и тоже значение в разных установках.
; (Для генерации значения GUID, нажмите Инструменты | Генерация GUID.)
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
AllowNoIcons=true
OutputBaseFilename={#MyAppName} {#MyAppVersion}
SetupIconFile={tmp}\ico.ico
Compression=lzma2/Ultra64
SolidCompression=true
InternalCompressLevel=Ultra64
DiskSpanning=false
DiskSliceSize=736000000
ShowLanguageDialog=auto
SlicesPerDisk=4
UninstallDisplayIcon={app}\ico.ico
;Авторские права.
VersionInfoCopyright={#AuthRep}
;Производитель.
AppPublisher={#AuthRep}
RawDataResource=Botva:botva2.dll|b2p:b2p.dll|Logo:logo.png|bPic:bPic.png|LiPic:LiPic.png|aPic:aPic.png
[Languages]
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
[Components]
Name: AIDA64; Description: AIDA64; Types: full;
Name: AIDA64\AIDA641; Description: {#AIDA641}; Flags: exclusive;
Name: AIDA64\AIDA642; Description: {#AIDA642}; Flags: exclusive;
[Tasks]
Name: icons; Description: Создать Ярлыки:;
Name: icons\desktop; Description: На Рабочем Столе;
Name: icons\quicklaunchicon; Description: В Панели Задач; OnlyBelowVersion: 0,6.1;
[Files]
;Файлы распаковываемые в папку с игрой. Необходимы для деинсталлятора
;Source: logo.png; Flags: dontcopy;
;Source: botva2.dll; Flags: dontcopy;
;Source: b2p.dll; Flags: dontcopy;
;Source: botva2.dll; DestDir:{app}
;Source: b2p.dll; DestDir:{app}
;Source: logo.png; DestDir: {app};
Source: WinTB.dll; Flags: dontcopy;
Source: {tmp}\ico.ico; DestDir: {app}; Flags: ignoreversion
; Примечание: Не используйте "Flags: ignoreversion" для системных файлов
[Dirs]
Name: {app}\{#AIDA641}; Components: AIDA64\AIDA641;
Name: {app}\{#AIDA642}; Components: AIDA64\AIDA642;
[Icons]
Name: {group}\{#AIDA641}; Filename: {app}\{#AIDA641}\{#AIDA64EXE1}; Components: AIDA64\AIDA641;
Name: {group}\{#AIDA642}; Filename: {app}\{#AIDA642}\{#AIDA64EXE2}; Components: AIDA64\AIDA642;
Name: {group}\{cm:UninstallProgram,{#MyAppName}}; Filename: {uninstallexe};
Name: {group}\Сайт {#MyAppName}; Filename: {#MyAppURL}
Name: {commondesktop}\{#AIDA641}; Filename: {app}\{#AIDA641}\{#AIDA64EXE1}; Tasks: icons\desktop; Components: AIDA64\AIDA641;
Name: {commondesktop}\{#AIDA642}; Filename: {app}\{#AIDA642}\{#AIDA64EXE2}; Tasks: icons\desktop; Components: AIDA64\AIDA642;
Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\{#AIDA641}; Filename: {app}\{#AIDA641}\{#AIDA64EXE1}; Tasks: icons\quicklaunchicon; Components: AIDA64\AIDA641;
Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\{#AIDA642}; Filename: {app}\{#AIDA642}\{#AIDA64EXE2}; Tasks: icons\quicklaunchicon; Components: AIDA64\AIDA642;
[Run]
Filename: {app}\{#AIDA641}\{#AIDA64EXE1}; Description: "{cm:LaunchProgram,{#StringChange(AIDA641, '&', '&&')}}"; Flags: nowait postinstall skipifsilent Unchecked; Components: AIDA64\AIDA641;
Filename: {app}\{#AIDA642}\{#AIDA64EXE2}; Description: "{cm:LaunchProgram,{#StringChange(AIDA642, '&', '&&')}}"; Flags: nowait postinstall skipifsilent Unchecked; Components: AIDA64\AIDA642;
[Messages]
BeveledLabel=RePack by {#AuthRep}
[UninstallDelete]
Type: files; Name: {app}
[Code]
const
AXEL_YELLOW = $48c1ca;
RT_RCDATA = 10;
var
TDV: TFolderTreeView;
TFV: TStartMenuFolderTreeView;
ResultCode: Integer;
lPLogo, bPicHandle, bPicHandle2, lPicHandle: THandle;
BtnImage: TBitmapImage;
function GetFromRes(const ResName, SaveFileName: String): Boolean;
var
lResStream: TResourceStream;
begin
lResStream := TResourceStream.Create(HInstance, ResName, RT_RCDATA);
try
lResStream.SaveToFile(ExpandConstant('{tmp}\') + SaveFileName);
finally
lResStream.Free;
Result := FileExists(ExpandConstant('{tmp}\') + SaveFileName);
end;
end;
procedure TDVOnChange(Sender: TObject);
begin
WizardForm.DirEdit.Text:= AddBackslash(TDV.Directory)+'{#MyAppName}';
end;
procedure TFVOnChange(Sender: TObject);
begin
WizardForm.GroupEdit.Text:= AddBackslash(TFV.Directory)+'{#MyAppName}';
end;
function InitializeSetup:boolean;
begin
if not FileExists(ExpandConstant('{tmp}\WinTB.dll')) then ExtractTemporaryFile('WinTB.dll');
Result:=True;
end;
procedure InitializeWizard;
begin
with WizardForm do
begin
WelcomePage.Color := AXEL_YELLOW;
MainPanel.Color := AXEL_YELLOW;
if GetFromRes('_IS_BOTVA', 'botva2.dll') and GetFromRes('_IS_B2P', 'b2p.dll') and GetFromRes('_IS_LOGO', 'logo.png') and GetFromRes('_IS_BPIC', 'bPic.png') and GetFromRes('_IS_LIPIC', 'LiPic.png') and GetFromRes('_IS_APIC', 'aPic.png') then
begin
bPicHandle := ImgLoad(WelcomePage.Handle, ExpandConstant('{tmp}\aPic.png'), WizardBitmapImage.Left, WizardBitmapImage.Top, WizardBitmapImage.Width, WizardBitmapImage.Height, True, True);
WizardBitmapImage.Hide;
ImgSetVisibility(bPicHandle, True);
ImgApplyChanges(WelcomePage.Handle);
bPicHandle := ImgLoad(FinishedPage.Handle, ExpandConstant('{tmp}\bPic.png'), WizardBitmapImage2.Left, WizardBitmapImage2.Top, WizardBitmapImage2.Width, WizardBitmapImage2.Height, True, True);
WizardBitmapImage2.Hide;
ImgSetVisibility(bPicHandle, True);
ImgApplyChanges(FinishedPage.Handle);
lPicHandle := ImgLoad(MainPanel.Handle, ExpandConstant('{tmp}\LiPic.png'), WizardSmallBitmapImage.Left, WizardSmallBitmapImage.Top, WizardSmallBitmapImage.Width, WizardSmallBitmapImage.Height, True, True);
WizardSmallBitmapImage.Hide;
ImgSetVisibility(lPicHandle, True);
ImgApplyChanges(MainPanel.Handle);
lPLogo:= ImgLoad(WizardForm.Handle, ExpandConstant('{tmp}\logo.png'), ScaleX(20), ScaleY(320), ScaleX(126), ScaleY(38), True, True);
ImgApplyChanges(WizardForm.Handle);
end;
SetTaskBarProgressValue(0, 60);
SetTaskBarProgressState(0, TBPF_ERROR);
TaskBarV10(MainForm.Handle, WizardForm.Handle, false, false, 0, 0, _m_);
TDV:= TFolderTreeView.Create(WizardForm);
TDV.Top:= WizardForm.DirEdit.Top+28;
TDV.Width:= 417;
TDV.Height:= 100;
TDV.OnChange:= @TDVOnChange;
TDV.Parent:= WizardForm.SelectDirPage;
TFV:= TStartMenuFolderTreeView.Create(nil);
TFV.Top:= WizardForm.GroupEdit.Top+28;
TFV.Width:= 417;
TFV.Height:= 100;
TFV.SetPaths(ExpandConstant('{userprograms}'),ExpandConstant('{commonprograms}'),ExpandConstant('{userstartup}'),ExpandConstant('{commonstartup}'));
TFV.OnChange:= @TFVOnChange;
TFV.Parent:= WizardForm.SelectProgramGroupPage;
with TLabel.Create(WizardForm) do
begin
Parent:=WizardForm;
AutoSize:=False;
Transparent:= true;
SetBounds(ScaleX(20), ScaleY(320), ScaleX(126), ScaleY(38));
end;
end;
end;
procedure DeinitializeSetup();
begin
gdipShutdown;
TaskBarDestroy;
end;
procedure InitializeUninstallProgressForm;
begin
with UninstallProgressForm do
begin
MainPanel.Color := AXEL_YELLOW;
if GetFromRes('_IS_BOTVA', 'botva2.dll') and GetFromRes('_IS_B2P', 'b2p.dll') and GetFromRes('_IS_LOGO', 'logo.png') and GetFromRes('_IS_LIPIC', 'LIPic.png') then
begin
lPicHandle := ImgLoad(MainPanel.Handle, ExpandConstant('{tmp}\LiPic.png'), WizardSmallBitmapImage.Left, WizardSmallBitmapImage.Top, WizardSmallBitmapImage.Width, WizardSmallBitmapImage.Height, True, True);
WizardSmallBitmapImage.Hide;
ImgSetVisibility(lPicHandle, True);
ImgApplyChanges(MainPanel.Handle);
lPLogo:= ImgLoad(UninstallProgressForm.Handle, ExpandConstant('{tmp}\logo.png'), ScaleX(20), ScaleY(320), ScaleX(126), ScaleY(38), True, True);
ImgApplyChanges(UninstallProgressForm.Handle);
end;
with TLabel.Create(nil) do
begin
Parent:=UninstallProgressForm;
AutoSize:=False;
Transparent:= true;
SetBounds(ScaleX(20), ScaleY(320), ScaleX(126), ScaleY(38));
end;
end;
end;
procedure DeinitializeUninstall();
begin
gdipShutdown;
end;