问题
I need to include a runtime as part of a project installer.
I was having trouble including it, as an error saying "an installation is already in progress" was appearing, due to the fact that I was essentially trying run an msi from within an msi.
I managed to get over this by including it in the "OnAfterInstall" event, however it appears now that it is not being installed on upgrades, only on fresh installs.
Can anyone offer any advice?
Thanks
回答1:
You don't specify what version of the Visual C++ Runtime, but this may work:
Visual Studio Installer Projects provide a prerequisites setting which is pre-populated with a list of common components. These are .mst files, so they can be merged into your installer. To reach the prerequisites screen, right-click your installer project -> Properties -> Prerequisites. Check the appropriate box in the list and change the option at the bottom to include the prerequisite in the setup program.
回答2:
apparently you should add it as a "merge module" in your MSI http://blogs.msdn.com/b/vcblog/archive/2007/10/12/how-to-redistribute-the-visual-c-libraries-with-your-application.aspx
来源:https://stackoverflow.com/questions/6623183/including-a-runtime-vcredist-x86-exe-as-part-of-an-installer