cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Lou_Elston
Level 6

How to identify com components ?

Besides manually stepping through every component to see which one has "com extract at build" set, or ".Net Com interop" set, is there something in the msi table that I can search for either by using the Direct Editor, or by using VBScript and accessing the windows installer database?
Labels (1)
0 Kudos
(6) Replies
HennoKeers
Level 7

We are naming every component that have COM info in it with _COM.
For example:
notepad.exe_COM.

reg, Henno.
0 Kudos
Lou_Elston
Level 6

But, if someone does not remember to name that component with "com", or mis-spells it, it would not be identified. There must be a way of identifying it in the database...I wonder if there is some kind of algorism that could be used to find it in the Attributes column.
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

COM information will typically associate class IDs with the component in the Class table. In general, this is one way to determine that COM extraction has been used against the keyfile of a component.
0 Kudos
Lou_Elston
Level 6

I see nothing in the class table that gives me a component\file name, only classid (which mean nothing to me). It appears that there is no way (besides naming the components with a 'Com' in them, to identify com components in an install...correct?
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

Each record in the Class table must provide a valid component name in the Component_ field. This will link the class ID to a component in the Component table. Since class information is always associated with the keyfile of a component, the corresponding record in the Component table provides the file record foreign key in the KeyPath column.

For example, the following screenshot shows a query of an MSI package which contains two files, both as keyfiles of their containing component. One of these files contained COM data that was extracted with COM extract at build.

I should note that this will only work with static or dynamic COM extraction. Components using .NET COM interop do not have any distinguishable information stored in the Registry table that would obviously identify the information as COM interop (meaning, the registry data in the Registry table would need to be analyed per component to look for COM interop specific information).
0 Kudos
Lou_Elston
Level 6

In the .ISM project file, in the direct Editor\Component table, there is an ISAttributes column. I think that a '49' value in this column indicates that this is a '.Net com Interop' component, and that a '20' in this column indicates that this is a 'Com Extract at Build' component. Does anyone agree or disagree with this? This information does not get to the .MSI file, so the .ISM file has to be searched for this information. Can anyone point me to a VBscript (any kind of script file would help), where using the Automation Interface (or something else), the .ISM file can be opened and the Component table read, and a list using a search criteria can be created. Another possibility is that I might be able to come up with a VBScript to read the .ISM file sequentially (it is stored in XML format), and parse out the information.
0 Kudos