#define MyAppName "My Program"
#define MyAppVerName "My Program 1.5"
#define MyAppExeName "MyProg.exe"
[Setup]
AppName={#MyAppName}
AppVerName={#MyAppVerName}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
OutputBaseFilename=setup
OutputDir=.
DisableProgramGroupPage=true
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Check: MakeStartMenuIcon
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Check: MakeDesktopIcon
[*Code]
var
StartMenuIcon,DesktopIcon: TCheckBox;
function MakeDesktopIcon: Boolean;
begin
Result:=DesktopIcon.Checked;
end;
function MakeStartMenuIcon: Boolean;
begin
Result:=StartMenuIcon.Checked;
end;
procedure InitializeWizard ();
begin
DesktopIcon := TCheckBox.Create(WizardForm);
DesktopIcon.Parent := WizardForm.SelectDirPage;
DesktopIcon.Caption := 'Добавить ярлык на Рабочий стол';
DesktopIcon.SetBounds(ScaleX(0),WizardForm.DirEdit.Top+ScaleY(90),ScaleX(400),ScaleY(25));
DesktopIcon.TabOrder := 0;
DesktopIcon.Checked:= true;
StartMenuIcon := TCheckBox.Create(WizardForm);
StartMenuIcon.Parent := WizardForm.SelectDirPage;
StartMenuIcon.Caption := 'Создать папку в меню Пуск';
StartMenuIcon.SetBounds(ScaleX(220),WizardForm.DirEdit.Top+ScaleY(90),ScaleX(400),ScaleY(25));
StartMenuIcon.TabOrder := 0;
StartMenuIcon.Checked:= true;
end;