Question

My Issue:

I have created two merge modules. Lets call them A and B. Merge Module B is dependent on A. A installs aaa.dll to windows side-by-side. B contains bbb.dll which registers during installation and is dependent on aaa.dll. As a side note merge module A was created in Install shield 2012 and merge module B was create using the visual studio 2010 wizard.

I have an install shield project which installs both merge modules. I go into Application Data->Redistributables and add B to the installation. This automatically checks off A. If I go to Organization->Setup Design and expand the feature which contains B then click B. It brings up the window with information regarding B. In there there is a Dependencies heading which correctly lists A.

I build the project and attempt to install it on a clean VM. During the installation I get an error saying bbb.dll has failed to register would I like to ignore, cancel. At this point I looked in winsxs on the machine and notice that aaa.dll does not exist in it's proper folder. Rather it exists in a winsxs\InstallTemp\ subfolder. Then if I click ignore on the error popup, the installation continues without further errors. Then after it has completed I can manually register bbb.dll just fine, and aaa.dll exists in the proper winsxs subfolder.

My question is how can I get merge module A to completely finish and place aaa.dll in the correct location so everything will install correctly?

Things I Have Tried:

  1. I have tried making multiple features in the Install Shield project under Organization->Setup Design. So I created 3 features. Feature 1 at the top which just contains A. Feature 2 which contains A then B. Finally Feature 3 which contains A again. I made all 3 features required. I was hoping this would mean the entire feature would finish installing and place aaa.dll in the correct side-by-side location. However, no such luck. (I created 3 features just in case I had the order backwards or something)
  2. I am fairly certain that the issue is that aaa.dll is just not installed in time or in the right place. To test this I tried installing aaa.dll first using an install shield installer that just installed merge module A. Then I ran my main installer and everything worked.

Sorry for the wall of text and any improper grammar\spelling. I will post if I figure out the issue myself just in case someone else eventually runs into this problem because it is really frustrating.

Was it helpful?

Solution

Files targeting the WinSXS and GAC aren't actually installed until commit phase execution because the API that publishes them doesn't support rollback operations. This means if you are using Self Registration on a DLL that depends on the file going to the WinSxS it won't work because you have a race condition. B.DLL will try to do a LoadLibrary() on A.DLL when calling DllRegisterServer and it won't find it.

Several work arounds:

1) Don't use Self Registration. Extract the COM data at design or build time as is the best practice.

2) Deploy A.DLL to another directory such as INSTALLDIR.

3) Wrap A.DLL up into it's own MSI and wire it up to your MSI as a setup prerequiste. This will install A in it's own transaction before starting the installation of your MSI.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top