Код:

#define MyAppName "My Program"
#define MyAppVersion "1.5"
#define MyAppPublisher "My Company, Inc."
#define MyAppURL "http://www.example.com/"
#define MyAppExeName "MyProg.exe"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{07BF4756-493A-4A92-8C99-65465807D1B5}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes
DisableDirPage=yes
DisableProgramGroupPage=yes
DisableReadyMemo=yes
DisableReadyPage=yes
DisableStartupPrompt=yes
DisableWelcomePage=no
DisableFinishedPage=no
[languages]
Name: rus; MessagesFile: compiler:Languages\Russian.isl;
Name: eng; MessagesFile: compiler:Languages\English.isl;
[Files]
Source: "C:\Program Files (x86)\Inno Setup 5\Examples\MyProg.exe"; DestDir: "{app}"; Flags: ignoreversion
[code]
var
MainPage : TWizardPage;
edtFolderToInstall : TEdit;
InstallLocation : String;
procedure BrowseClick(Sender : TObject);
var
Dir : String;
begin
Dir := edtFolderToInstall.Text;
if BrowseForFolder('Select Folder',Dir,false) then
edtFolderToInstall.Text := Dir;
end;
procedure InitializeWizard();
var
lblFolderToInstall : TLabel;
btnFolderToInstall : TButton;
begin
MainPage := CreateCustomPage(wpWelcome,'Select Destination Location','Where should {#MyAppName} be installed ?');
lblFolderToInstall := TLabel.Create(MainPage);
lblFolderToInstall.Parent := MainPage.Surface;
lblFolderToInstall.Top := 10;
lblFolderToInstall.Left := 10;
lblFolderToInstall.Caption := 'If you would like to select a different folder, Click Browse.'
edtFolderToInstall := TEdit.Create(MainPage);
edtFolderToInstall.Parent := MainPage.Surface;
edtFolderToInstall.Top := 40;
edtFolderToInstall.Left := 7;
edtFolderToInstall.Width := 321;
edtFolderToInstall.Text := WizardDirValue;
btnFolderToInstall := TButton.Create(MainPage);
btnFolderToInstall.Parent := MainPage.Surface;
btnFolderToInstall.Top := 38;
btnFolderToInstall.Left := 340;
btnfolderToInstall.Caption := 'Browse...';
btnFolderToInstall.OnClick := @BrowseClick;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
case CurPageID of
MainPage.ID:
begin
WizardForm.NextButton.Caption := SetupMessage(msgButtonInstall);
end;
end;
end;