3

I would like to know how to add additional setup exe and execute the additional exe with my main exe using innosetup.

Kindly help me as I am trying this for the last 3 days as I am new in using innosetup.

Thank you.

reapen
  • 705
  • 4
  • 13
  • 26
  • 1
    You will include those binaries into the [`[Files]`](http://www.jrsoftware.org/ishelp/index.php?topic=filessection) section and run them from the [`[Run]`](http://www.jrsoftware.org/ishelp/index.php?topic=runsection) section. – TLama May 20 '13 at 07:41

2 Answers2

10

The simplest way is to call you additional EXE in [Run] section. All EXE files should be added to main setup in [Files] section. You can either just copy them to the TEMP folder for the installation time or copy them to your app folder (if needed).

[Files]
Source: "d:\ADDS\*"; DestDir: "{tmp}"; 
Flags: nocompression createallsubdirs recursesubdirs deleteafterinstall
//contains DirectX in directx folder, VC Redist 2010 x86 and VC Redist 2010 x64 

[Run]
Filename: "{tmp}\directx\DXSETUP.exe"; Parameters: "/silent"; Flags: waituntilterminated skipifdoesntexist; StatusMsg: "Microsoft DirectX installation. Please wait..."
Filename: "{tmp}\vcredist_x86_2010.exe"; Parameters: "/Q"; Flags: waituntilterminated skipifdoesntexist; StatusMsg: "Microsoft Visual C++ 2010 (x86) installation. Please Wait..."
Filename: "{tmp}\vcredist_x64_2010.exe"; Parameters: "/Q"; Flags: waituntilterminated skipifdoesntexist; StatusMsg: "Microsoft Visual C++ 2010 (x64) installation. Please wait..."; Check: IsWin64
RobeN
  • 5,346
  • 1
  • 33
  • 50
  • This answer seems to be more accurate for the question as it uses temporary directory as a destination for the file which is then executed. That's better if it's a setup which is not needed to be copied to the target system. [+1 to both answers though :-)] – TLama May 20 '13 at 08:09
  • Is it possible to inside [run] when files are from Post compilation. [_ISToolPostCompile] Name: D:\Cleanup.exe; Parameters: Name: D:\WinRarFullVersion.exe; Parameters: Name: d:\Setup\*; Parameters: – reapen May 20 '13 at 09:52
  • 2
    @reapen how do you mean? `[_ISToolPostCompile]` and `[Run]` are completely unrelated and run at different times. `[_ISToolPostCompile]` only runs on your setup build machine when compiling with ISTool. – Deanna May 20 '13 at 14:15
  • @Deanna: Yes you are correct. I am trying to install a printer set with silent mode but it's asking the directory path to install but this should not happen, so I tried with _IStoolPostComplie option. Is ther any possible way that when we mention silent mode the directory path should not prompt to user while installing using innosetup.Thank you. – reapen May 21 '13 at 01:55
  • @reapen - You would have to check if there is possible parameter for your drivers setup that forces the installation directory or check if there is parameter for quiet+unattended mode. Are these drivers to be found enywhere on internet to download? – RobeN May 21 '13 at 07:40
  • 1
    @Roben - I could able to achieve it using slient mode parameter when trying to install the 3rd party setup, inside [Run]Filename: {app}\Setup.exe; Parameters: Setup.exe /s; By doing so the printer setup is now installing without asking default directory. – reapen May 21 '13 at 09:19
  • @reapen - good to hear that you have found the correct parameter for your 3rd party setup. – RobeN May 21 '13 at 09:29
  • I want to thank everyone who helped me and shared their valuable inputs and suggestions.especially to RobeN who's simplest way help me to do the required installation. – reapen May 21 '13 at 09:38
  • @Deanna yes I clicked on the green tick. Thank you. – reapen May 23 '13 at 05:02
  • This doesn't work anymore. Now you need to add a front slash to break a single run statement into multiple lines. – Spero Jun 21 '19 at 12:35
4

Inno doesn't have a concept of a "main exe". If you want to include two executables, then you just need to create multiple [Files] entries. Once installed, you can then just have multiple [Run] entries.

[Files]
;Console
Source: ..\Console.exe; DestDir: {app}; Flags: ignoreversion
#ifdef debug
Source: ..\Console.map; DestDir: {app}
Source: ..\Console.pdb; DestDir: {app}
#endif
Source: ..\Console.chm; DestDir: {app}

;Node
Source: ..\Node.exe; DestDir: {app}; Flags: ignoreversion
#ifdef debug
Source: ..\Node.map; DestDir: {app}
Source: ..\Node.pdb; DestDir: {app}
#endif
Deanna
  • 23,876
  • 7
  • 71
  • 156