insombia, как так
читать дальше »
[Setup]
AppName=My Program
AppVerName=My Program 1.5
DefaultDirName={pf}\My Program
[Languages]
Name: russian; MessagesFile: compiler:Languages\Russian.isl
[CustomMessages]
russian.SoftTask=Установить дополнительное ПО
russian.SoftInstall=Идет установка дополнительного ПО. Пожалуйста подождите...
[Icons]
Name: {commondesktop}\My Program; Filename: {app}\MyProg.exe; IconIndex: 0; Check: MakeDesktopIcon
[code]
var
Soft: TCheckBox ;
DesktopIcon: TCheckBox;
DesktopIconlb: TLabel;
function MakeDesktopIcon: Boolean;
begin
Result:=DesktopIcon.Checked;
end;
procedure InitializeWizard();
begin
Soft:= TCheckBox.Create(WizardForm)
Soft.SetBounds(WizardForm.DirEdit.Left, WizardForm.DirEdit.Top+ScaleY(26), ScaleX(200), ScaleY(20))
Soft.Caption:= ExpandConstant('{cm:SoftTask}')
Soft.Checked:=True;
Soft.Parent:=WizardForm.SelectDirPage;
DesktopIcon := TCheckBox.Create(WizardForm);
with DesktopIcon do
begin
Left := ScaleX(0);
Top := ScaleY(130);
Width := ScaleX(15);
TabOrder := 0;
Checked := True;
Parent := WizardForm.SelectDirPage;
end;
DesktopIconlb := TLabel.Create(WizardForm);
DesktopIconlb.Left := DesktopIcon.Left + ScaleX(17);
DesktopIconlb.Top := DesktopIcon.Top + ScaleY(3);
DesktopIconlb.Caption := 'Добавить ярлык на рабочий стол';
DesktopIconlb.Font.Color := clblack;
DesktopIconlb.Transparent := True;
DesktopIconlb.Parent := WizardForm.SelectDirPage;
end;
procedure CurStepChanged(CurStep: TSetupStep);
var res: integer;
begin
if CurStep = ssPostInstall then begin
If Soft.Checked then begin
WizardForm.FileNameLabel.Caption:=ExpandConstant('{cm:SoftInstall}');
Exec(ExpandConstant('{src}\Redist\PhysX_9.09.0428_System Software.exe'), '/quiet', ExpandConstant('{src}\Redist'), SW_SHOW, ewWaitUntilTerminated, Res);
Exec(ExpandConstant('{src}\DirectX\DXSETUP.exe'), '/silent', ExpandConstant('{src}\DirectX'), SW_SHOW, ewWaitUntilTerminated, Res);
if isWin64 then
Exec(ExpandConstant('{src}\Redist\vcredist_x64.exe'), '/Q', ExpandConstant('{src}\Redist'), SW_SHOW, ewWaitUntilTerminated, Res)
else
Exec(ExpandConstant('{src}\Redist\vcredist_x86.exe'), '/Q', ExpandConstant('{src}\Redist'), SW_SHOW, ewWaitUntilTerminated, Res);
end;
end;
end;