My company is developing an application that has a dependency on PostgreSQL, we are developping the installer by using WIX. How can we make the PostgreSQL installer (which is also a msi file) run automatically when installing our application? What do we need to set in Wix? If you happen to know any webpage explains this, please post the link. Thank you!
My company is developing an application that has a dependency on PostgreSQL, we are
Share
One Windows Installer session cannot launch another one, so one msi cannot install another msi. Therefore you need to make a third application, a bootstrapper, which installs both MSI files.
To create such a bootstrapper you can use msbuild’s generatebootstrapper task. The wix documentation already covers how to use this task to generate a bootstrapper that installs the .NET framework. See How To: Install the .NET Framework Using a Bootstrapper. This makes use of the pre-defined bootstrapper packages for the .NET framework.
However, in this case you will also have to author your own bootstrapper package for the PostgreSQL msi. One way to do this is to study the existing bootstrapper packages in
C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\(or the ones in the Windows SDK) and read the documentation of the Bootstrapper Manifest XML format. The bootstrapper generator tool might also be helpful.You might think this is all rather complicated. For a simpler alternative for generating bootstrappers, take a look at dotNetInstaller, which is actually a general purpose bootstrapper generator. It looks slick but I don’t have any hands-on experience with it yet.