wixwindows-installermsvc12

Is it possible to run another installer while installing something in Windows?


I have an .msi installer developed using wix that installs some dlls in a directory on the file system. Some of these dlls have dependency on Visual C++ Redistributable Packages for Visual Studio 2013. I am wondering that is it possible to install that run time (downloaded from https://www.microsoft.com/en-us/download/details.aspx?id=40784) during my installer's installation process? - that is while the .msi installer is running and copying dlls, it will install the MSVC run time at the same time for the user.

I want to know if this is possible.. If it is, is this generally a good or bad practice? Should it be enough to just copy the MSVCP120.dll and MSVCR120.dll along with all other dlls? Thanks.


Solution

  • VC++ Runtime: The Visual C++ runtime can be installed via merge modules (basics) inside the MSI (there are some limitations with later versions of the runtime) or as an executable on its own (vcredist_x86.exe or vcredist_x64.exe), generally installed before your main MSI (latest C++ downloads).

    Setup.exe: You can bundle such a runtime installer inside a setup.exe made with WiX's Burn feature (Hello Burn example - it is a bootstrapper, chainer, launcher - runs installs in sequence) or a similar feature in InstallShield (suite projects), Advanced Installer or other packaging tools. Some resources: More on Burn and Making setup.exe launchers.

    Universal CRT: As stated in this answer, it is recommended to use the vcredist_x86.exe or vcredist_x64.exe installers instead of the merge modules due to the "Universal CRT" components not being installed properly with the merge modules. "Universal CRT" relates to Visual C++ support for Universal Apps built for the Universal Windows Platform.

    Single File Copy: Please avoid copying single files to the location application folder. This is important in order to be able to rely on system-wide security fixes for the C++ runtime (coming down from Windows Update or installed in other ways).


    Links: