PDA

View Full Version : Component in mulitple Features not COM registering properly



kkirby8571
06-24-2004, 07:54 AM
I have found an intriguing problem and I am not sure why it is happening.

This is the simplified setup I am using :

Component A is incorporated in Features 1 & 2, Component A is a Extract at Build COM server.

The build process performs as expected and all the registry settings are exported correctly.

However if I only install Feature 2 the COM object is not installed correctly.

If I install Feature 1 the COM object is installed correctly. Similarly if I install Features 1 & 2 this also works, it just appears to be for when I want to install Feature 2 on its own the COM registration fails.

Has anyone come across anything similar ?

KathyMorey
06-24-2004, 08:29 AM
Yes, I have. What I found was this:

When you add a component to a feature, the FeatureComponent table is updated to reflect that - it has one entry for each feature/component combination, as it should.

But, when the COM extract process works, it adds one entry to the Class table for each class, regardless of how many features that COM component belongs to. This sounds like it should be okay, but the Class table contains both a Component column and a Feature column, and obviously only one of the Feature/Component combinations can be filled in here.

Consequently, the Class info gets installed only with the feature that's listed in the Class table - for the other features containing that COM component, the files get installed but the registry entries don't.

I worked around this by making sure that any COM components I have are assigned to only one (often hidden) feature, and that feature gets turned on whenever I am installing something that needs the COM component.

HTH

kkirby8571
06-24-2004, 08:43 AM
Hi Kathy,

Thanks for this, I also found that the Self Register works regardless, which makes my life simpler if at the same time breaking the Best Practises but sometimes rules are there to be broken ;-)

Thanks