简体   繁体   中英

Install another package in MSI Installer

I use MSI Installer for my project's setup. The project is a PowerPoint AddIn. To run my project, I need to install a third party package ( an exe file ). As I investigated, this package installs on my computer:

  • a dll file in the user's application folder
  • some dll files in C:\\WINDOWS\\assembly\\GAC_MSIL\\

Coming back to my MSI Installer. There are 2 solutions:

1) Including all the package's dll files above into my project, and create a MSI Setup as normal.

I always got error like: "Retrieving the COM class factory for component with CLSLD {38...} failed due to the following error 80... The specific module could not be found. Exception from HRESULT:0X80..."

2) Create a custom action in MSI Setup, and try to install the package before installing our project.

And when uninstalling the project, we need to uninstall the package first.

Any other solutions? or any suggestion? Thanks

Note: I am using PowerPoint 2010, 2013, VS Ultimate 2013, VSTO, C#

Have you looked into the Wix Toolset ? Specifically, Wix Bootstrapper . The bootstrapper allows you to build an installation that can install other MSIs as packages first, before installing yours. We're using it for a number of projects and it works well.

The first problem "retrieving the COM class factory..." is just an indication that you didn't get the registration correct, and since you don't say what COM registration you tried (if any) it's not possible to diagnose it.

You cannot create another custom MSI setup and install it as a custom action from your setup. First, it doesn't work because you can't have recursive MSI setups, and that applies to the uninstall too so you cannot have your install call a custom action to uninstall another product.

Your best bet is to create a merge module for the add-in and include it in your product. The question to ask is whether the add-in is a separate product which maybe shipped as a standalone product. If it is, then make it an MSI and use the WiX Burn/Bundle approach. If not, then make it a merge module that can be included in any MSI. Either way, if the Dlls are going into a MSI or an MSM you need to figure out the COM registration.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM