#define MyAppName "My Program"
#define MyAppVersion "1.5"
#define MyAppExeName "MyProg.exe"
[Setup]
AppName={#MyAppName}
AppVersion={#MyAppVersion}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
AllowNoIcons=yes
OutputBaseFilename=setup
[Languages]
Name: "default"; MessagesFile: "compiler

efault.isl"
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
[Code ]
var
NoIcons: TNewCheckBox;
NoIconsLabel: TLabel;
procedure NoIconsClick(Sender: TObject);
begin
if NoIcons.Checked then begin
WizardForm.GroupEdit.Enabled := False;
WizardForm.GroupBrowseButton.Enabled := False;
end
else begin
WizardForm.GroupEdit.Enabled := True;
WizardForm.GroupBrowseButton.Enabled := True;
end;
end;
procedure NoIconsLabelClick(Sender: TObject);
begin
case TLabel(Sender).Tag of
0: begin
TLabel(Sender).Tag := 1;
WizardForm.GroupEdit.Enabled := False;
WizardForm.GroupBrowseButton.Enabled := False;
NoIcons.Checked:= True;
end;
1: begin
TLabel(Sender).Tag := 0;
WizardForm.GroupEdit.Enabled := True;
WizardForm.GroupBrowseButton.Enabled := True;
NoIcons.Checked:= False;
end;
end;
end;
procedure InitializeWizard();
begin
WizardForm.NoIconsCheck.Hide;
NoIcons := TNewCheckBox.Create(WizardForm);
with NoIcons do
begin
Parent := WizardForm.SelectProgramGroupPage;
Left := ScaleX(8);
Top := ScaleY(208);
Width := ScaleX(17);
Height := ScaleY(17);
OnClick := @NoIconsClick;
end;
NoIconsLabel := TLabel.Create(WizardForm);
with NoIconsLabel do
begin
Parent := WizardForm.SelectProgramGroupPage;
Caption := 'Не создавать папку в меню «Пуск»';
Left := ScaleX(28);
Top := ScaleY(210);
Width := ScaleX(180);
Height := ScaleY(13);
Font.Color := clRed;
OnClick := @NoIconsLabelClick;
end;
end;