Use WiX or Inno Setup to bundle the installation o

2019-03-30 07:31发布

问题:

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?

回答1:

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"""


回答2:

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.