4

I use cx-freeze to create an MSI installer for a Python application. Let's call it application "A". It depends on another application "B". I would like my installer for "A" to include and run the MSI installer for "B". How can I create a bootstrapping/chaining installer using Inno Setup or the WiX toolset?

joshuanapoli
  • 2,509
  • 3
  • 25
  • 34
  • Where does Inno Setup come into this? – Deanna Apr 02 '13 at 16:18
  • 1
    @TLama I see the answer, but that doesn't seem to relate to the question which asked about using cx-freeze and creating an MSI package, which includes another MSI package. The given answer with Inno makes no mention of cx-freeze, doesn't create an MSI package and just extracts/runs two other MSI packages. Either the question is wrong or they OP is missing a huge chunk of context. – Deanna Apr 02 '13 at 22:53
  • @Deanna, I'm sure you did, but if OP would repahrase the question to something like *"How to make a bundle installer with InnoSetup"*, then it might be fine (if there's no duplicate of it, of course). – TLama Apr 03 '13 at 00:52
  • @TLama I learned from Rob Mensching's answer that I should make a bootstrapper or chain installer rather than try to force a tool designed for a single application to install several applications. Inno Setup and WiX are the appropriate tools. I'm trying to learn the best way to use these tools to accomplish my goal. I edited the question to mention Inno Setup and WiX. – joshuanapoli Apr 03 '13 at 14:38

2 Answers2

6

Here is a basic Inno Setup script that bundles two MSI installations into a single setup program. Since the installer only exists to install MSI files, there is no need for an application directory. To avoid creating the application directory, use "CreateAppDir=no". (thanks TLama!)

[Setup]
AppName=My Bundle Installer
AppVersion=0.1
DefaultDirName={pf}\MyCo\MyBundle
DefaultGroupName=My Bundle Group
Uninstallable=no
CreateAppDir=no

[Files]
Source: "A.msi"; DestDir: "{tmp}"
Source: "B.msi"; DestDir: "{tmp}"

[Run]
Filename: "msiexec.exe"; Parameters: "/i ""{tmp}\A.msi"""
Filename: "msiexec.exe"; Parameters: "/i ""{tmp}\B.msi"""
joshuanapoli
  • 2,509
  • 3
  • 25
  • 34
  • 3
    If that's what makes you trouble, set in your script the [`CreateAppDir`](http://jrsoftware.org/ishelp/topic_setup_createappdir.htm) directive to `no` and no directory will be created as well as no directory selection page will be shown. [+1] – TLama Apr 01 '13 at 17:41
  • How about appending `; Flags: deleteafterinstall` to the [Files] entries, for cleanliness? Also, a nice addition to the [Run] entries might be `; Flags: hidewizard` so the Inno Setup window won't appear in the background while the MSIs are running. – Pete Jan 15 '14 at 19:22
3

You'll need to use a bootstrapper/chainer. For example, the WiX toolset provides a concept called a Bundle that can combine multiple packages into a single installation.

Rob Mensching
  • 33,834
  • 5
  • 90
  • 130
  • The WIX toolset looks nice, but I wasn't able to find a recipe for bundling several MSI files into a single installer. Figuring out the whole WIX schema is a bit too much for this project. – joshuanapoli Apr 01 '13 at 14:19
  • I answered a similar question here, with WiX code for the MSI and the bundle: http://stackoverflow.com/questions/27521546/how-to-create-a-installer-that-installs-a-3rd-party-setup-exe-and-locates-cus/42102377#42102377 – TomEberhard Feb 08 '17 at 18:49