PhilB
Posts: 95
Joined: Fri Jul 06, 2007 4:13 pm

Problems with Merge Modules

I have created a merge module which, amongst other things, registers an ocx control and installs and starts a service. The items installed via the merge module are created with Visual Studio 2005 and have dependencies on msvcr80.dll and mfc80.dll. I have added the Microsoft merge modules for these files as dependencies for my merge module. My main install project includes these merge modules and when run in XP everything works. My problem is when running the install in Vista. The ocx fails to register and the service fails to start. On investigation a side by side error appears in the event log. It appears that the registration and the service starting are taking place before the files appear in the WinSxS directory! If I change the merge module to not register the ocx and to install but not start the service, then I am able to perform these tasks manually at the conclusion of the install. Is there some way of ensuring that the actions performed by the Microsoft merge modules complete before those in my module start? I appreciate that I could use the Microsoft re-distributable package in a bootstrapped install rather than the merge module approach but I would prefer not to go down this path.
Regards,

Phil
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Problems with Merge Modules

Hi Phil,

This behavior may be caused by a known issue, you can read more about it here. The "SelfRegModules" standard action is the one which handles the registration of your DLL. Since it runs before the Microsoft assemblies are published, it fails.

You can try using one of the solutions from the article I mentioned. Other solutions would be:
- use the Extract registration info from native library registration option if your assembly supports it

or

- move the "SelfRegModules" standard action after "MsiPublishAssemblies" in the "Custom Actions" page (this is not really recommended and it may not work)

or

- use a custom action to register the assembly; the custom action can use the Commit with no impersonation option to run at the end of install with full privileges

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
PhilB
Posts: 95
Joined: Fri Jul 06, 2007 4:13 pm

Re: Problems with Merge Modules

Thanks for the info. This was the cause of my problems.

Return to “Common Problems”