1

I'm very new with Inno setup and programming all together. I have also downloaded Inno Download Plugin. This is the code that I have:

#include <idp.iss>

[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={{03266F5E-17A0-4473-BC18-EF511BDFDB5A}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DisableProgramGroupPage=yes
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes
SetupIconFile="C:\Desktop\appIcon.ico"

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"

[Types]
Name: "full"; Description: "Without Requirements"
Name: "custom"; Description: "With Requirements"; Flags: iscustom

[Components]
Name: "program"; Description: "My Program"; Types: full custom; Flags: fixed
Name: "framework4"; Description: "Microsoft .NET Framework 4 Client Profile"; Types: custom
Name: "sqlServer32"; Description: "SQL Server 2012 (32 bits) English"; Types: custom
Name: "sqlServer64"; Description: "SQL Server 2012 (64 bits) English"; Types: custom
Name: "sqlServerManagment32"; Description: "SQL Server Managment Studio (32 bits)"; Types: custom
Name: "sqlServerManagment64"; Description: "SQL Server Managment Studio (64 bits)"; Types: custom
Name: "crystalReports"; Description: "Crystal Reports"; Types: custom

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
All my program files... with Components: program;

[Code]
procedure InitializeWizard();
begin
 idpDownloadAfter(wpReady);
end;

function NextButtonClick(CurPage: Integer): Boolean;
begin
  if CurPage = wpSelectComponents then
  begin
    idpClearFiles;
    if IsComponentSelected('sqlServer64') then idpAddFile('http://download.microsoft.com/download/8/D/D/8DD7BDBA-CEF7-4D8E-8C16-D9F69527F909/ENU/x64/SQLEXPRWT_x64_ENU.exe',ExpandConstant('{tmp}\SqlServer201264Eng.exe'));
    if IsComponentSelected('crystalReports') then idpAddFile('http://downloads.businessobjects.com/akdlm/crnetruntime/clickonce/CRRuntime_32bit_13_0_21.msi',ExpandConstant('{tmp}\CrystalReport32bit.msi'));
  end; 
  Result := True;
end;

What I want to do is to make the user select which components he/she would like to install, download the setups and execute them before installing my program.
What I have now is up to the part where the setups are downloaded, but I don't know how to execute them.
I don't understand much about this so any improvement to the code will be appreciated it. Thanks.

Macs
  • 53
  • 1
  • 6
  • 1) Why do you copy the sub-installers to `{app}`? 2) At what point to your want to run the sub-installers? - Does your installer do anything else in addition to downloading and running the sub-installers? – Martin Prikryl Nov 06 '17 at 15:05
  • Use [Inno Download Plugin](https://bitbucket.org/mitrich_k/inno-download-plugin) instead! InnoTools Downloader has not been updated for a decade! – Martin Prikryl Nov 06 '17 at 15:07
  • @MartinPrikryl 1) That's just a code that I copyed from somewhere to try and install the setups, shouldn't be there, sorry. 2) I want them to run after all the previously selected files are downloaded. It should go like this: -Select subinstallers-Download subinstallers -Run subinstallers -And then it installs "My Program". All the steps work but I'm missing the part of running the subinstallers. – Macs Nov 06 '17 at 15:16
  • So please remove the code that *"shouldn't be there"* from your question. And reimplement what you have using Inno Download Plugin. – Martin Prikryl Nov 06 '17 at 15:17
  • @MartinPrikryl if i reimplement what i have but using inno download plugin I'll be at the same spot. I changed the methods to match the ones from inno download plugin but I'm still missing the code where it executes the setups – Macs Nov 06 '17 at 15:39
  • Sure, but we would be happy to answer your IDP-based question. While I do not think that anyone would be eager to answer ITD-based question. – Martin Prikryl Nov 06 '17 at 15:40
  • Anyway, I've dug my old answer that covers both plugins. – Martin Prikryl Nov 06 '17 at 15:47
  • Use HTTPS for the download URLs! – Martin Prikryl Nov 06 '17 at 15:49
  • @MartinPrikryl okay. Thank you for the recommendations. – Macs Nov 06 '17 at 16:02

0 Answers0