Devils Night,
вот "автозапуск"
ищет во внешней папке program
setup_1.exe
setup_2.exe
setup_3.exe
если одного из них нет, то нет переключателя
читать дальше »
Код:

; Скрипт создан с помощью
; IS GameScript Generator by South
; специально для www.csmania.ru
#define MyAppName "Autorun"
[Setup]
SourceDir=.
OutputDir=Setup
AppName={#MyAppName}
AppVerName={#MyAppName}
AppVersion={#MyAppName}
CreateAppDir=false
OutputBaseFilename={#MyAppName}
Uninstallable=false
//SetupIconFile=hl2.ico
ShowLanguageDialog=auto
LanguageDetectionMethod=uilanguage
UsePreviousLanguage=no
DisableProgramGroupPage=yes
DisableWelcomePage=yes
DisableDirPage=true
DisableFinishedPage=yes
[Languages]
Name: Russian; MessagesFile: compiler:Languages\Russian.isl;
Name: English; MessagesFile: compiler:Languages\English.isl;
[Messages]
Russian.SetupWindowTitle=%1
Russian.WizardReady=что установить?
Russian.ReadyLabel2b=
[CustomMessages]
Russian.go=Установить
English.go=Install
Russian.exit=Закрыть
English.exit=Close
[run]
Filename: {src}\program\setup_1.exe; WorkingDir: {src}\program; Flags: skipifdoesntexist nowait; Check: X;
Filename: {src}\program\setup_2.exe; WorkingDir: {src}\program; Flags: skipifdoesntexist nowait; Check: Y;
Filename: {src}\program\setup_2.exe; WorkingDir: {src}\program; Flags: skipifdoesntexist nowait; Check: Z;
[----Code]
var
install_1: TNewRadioButton;
install_2: TNewRadioButton;
install_3: TNewRadioButton;
function X: Boolean;
begin
If FileExists(ExpandConstant('{src}\program\setup_1.exe')) then
Result:=install_1.Checked;
end;
function Y: Boolean;
begin
If FileExists(ExpandConstant('{src}\program\setup_2.exe')) then
Result:=install_2.Checked;
end;
function Z: Boolean;
begin
If FileExists(ExpandConstant('{src}\program\setup_3.exe')) then
Result:=install_3.Checked;
end;
procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
Confirm:=False;
Cancel:=True;
end;
procedure InitializeWizard();
begin
WizardForm.InnerPage.Color := clInfoBk;
WizardForm.Color := clActiveCaption;
WizardForm.MainPanel.Color := clActiveCaption;
WizardForm.WizardSmallBitmapImage.Visible := False;
WizardForm.BorderStyle := bsToolWindow;
If FileExists(ExpandConstant('{src}\program\setup_1.exe')) then
begin
install_1 := TNewRadioButton.Create(WizardForm);
with install_1 do
begin
Name := 'install_1';
Parent := WizardForm.ReadyPage;
Left := ScaleX(16);
Top := ScaleY(24);
Width := ScaleX(113);
Height := ScaleY(17);
Caption := 'program 1';
end;
end;
If FileExists(ExpandConstant('{src}\program\setup_2.exe')) then
begin
install_2 := TNewRadioButton.Create(WizardForm);
with install_2 do
begin
Name := 'install_2';
Parent := WizardForm.ReadyPage;
Left := ScaleX(80);
Top := ScaleY(64);
Width := ScaleX(113);
Height := ScaleY(17);
Caption := 'program 2';
end;
end;
If FileExists(ExpandConstant('{src}\program\setup_3.exe')) then
begin
install_3 := TNewRadioButton.Create(WizardForm);
with install_3 do
begin
Name := 'install_3';
Parent := WizardForm.ReadyPage;
Left := ScaleX(136);
Top := ScaleY(112);
Width := ScaleX(113);
Height := ScaleY(17);
Caption := 'program 3';
end;
end;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID=wpReady then
begin
WizardForm.PageDescriptionLabel.Hide;
WizardForm.NextButton.Caption:= ExpandConstant('{cm:go}');
WizardForm.CancelButton.Caption:= ExpandConstant('{cm:exit}');
end;
end;