views:

253

answers:

1

I'm building an ActiveX control installer in VS2008 which uses both the CRT and MFC merge modules to install. When my control tries to register on Windows 7 it fails.

Dependency Walker says I'm missing the mfc90u.dll, msvcr90.dll and msvcp90.dll dependencies when trying to register my control and the install fails. Are the merge modules supposed to take care of this? My output OCX is being registered with the vsdrpCOMSelfReg option. From what I am reading on other forums, this might not be the best method, what should I try at this point?

Install works fine on Windows XP.

Update 4/8/2010:

Changed to vsdrpCOM and the install gets through (no surprise), however, msvcr90.dll isn't being found afterwards. I thought this was handled by the merge module for CRT (microsoft_vc90_crt_x86.msm)? On Windows XP, Dependency Walker finds it in Windows/System32, not in the SxS folder like I expected. On Windows 7 it just doesn't find it at all. Should I be putting the msvcr90.dll into Windows/System32 myself? It doesn't seem like it.

Update 4/20/2010:

Well it seems as though Dependency Walker finds msvcr90.dll at the top level dependency of the control itself, although msvcp90.dll and mfc90u.dll both have implicit/forwarded dependencies on msvcr90.dll as well and those couldn't be resolved in the Dependency Walker. The control, however, registers fine and runs loading those libraries. Is this something that can be ignored?

+1  A: 

The two modules you need are: - Microsoft_VC90_MFC_x86.msm - Microsoft_VC90_CRT_x86.msm

For a 64-bit app you should be using - Microsoft_VC90_MFC_x86_64.msm - Microsoft_VC90_CRT_x86_64.msm

Unfortunately self-registration causes a lot of problems, what you should do is add the required registry entries manually into the setup project. (The 'heat' tool from WiX provides a really easy way to capture this information, although if you wrote the DLL you should know the required entries already). The real problem with self-registration is that if it fails, then the setup dies. The most obvious problem is that if your DLL requires additional modules to successfully complete self-registration and they're being installed at the same time you can't guarantee that the system will find them present for self-registration to complete.

sascha