wixvisual-c++-2010wix3.8wix3.9

Wix Toolset install C++ 2010 Redistributable


Can I integrate installation of Microsoft Visual C ++ 2010 redistributable together with my installation package through the Wix Toolset?

I tried this with a custom action, but it does not install if another installation is in progress. Would someone have any suggestions on how to do this?

Also, another question: can I call an MSI installer within this MSI installer that I am creating?


Solution

  • You can't do recursive MSI installs - at the risk of stating the obvious, when you get that error "another install is in progress" that other install is you.

    If you use merge modules to install VC Runtimes AND you have a C++ service that is dependent on them that you start with StartServices (WiX ServiceControl) then you may find that the service won't start. This is because the SxS versions of the C++ Runtimes are not available until InstallFinalize, which is after the StartServices action. Possible solutions to this are:

    Have the service built with static links to the C++ runtimes, but then updates to the VC++ runtime Dlls won't be applied to your built binary, in case that's an issue.

    Use a bootstrapper like Burn to run the VC++ redist exe before you install your own MSI file.

    Copy the runtime Dlls to your app folder as private copies that will be used only by your app. This kind of thing, old but still applicable I believe:

    http://blogs.msdn.com/b/vcblog/archive/2007/10/12/how-to-redistribute-the-visual-c-libraries-with-your-application.aspx

    Another issue you may run into with using the merge modules is that they require a per machine install. If you include them in a per User install then the install will fail.