locked
COM api invoking MSI installer RRS feed

  • Question

  • Hi,

    I have COM component, which is delivered through MSI. I have some issue where I can see popup of msi trying to re-install the components again, this happens while application is executing. When I debugged it, I noticed that for one of the CoCreateInstance for the component, COM API is internally invoking MSI installer. I am not able to understand why is this happening.

    Following is the call stack

    0868e634 7d2c5d03 msi!MsiUIMessageContext::ProcessMessage+0x357
    0868e6c4 7d2c5f21 msi!MsiUIMessageContext::RunInstall+0x40e
    0868e708 7d2e5dab msi!RunEngine+0xe0
    0868e7b8 7d25aba4 msi!ConfigureOrReinstallFeatureOrProduct+0x1d5
    0868e7f0 7d1fbd6d msi!MsiConfigureFeatureW+0x8d
    0868e960 7d1f2537 msi!ProvideComponent+0x239
    0868eb18 7d1f2afe msi!ProvideComponentFromDescriptor+0x1d8
    0868eb50 77dfbf24 msi!MsiProvideComponentFromDescriptorW+0x6b
    0868ebe4 77554eaf advapi32!CommandLineFromMsiDescriptor+0x1c5
    0868ee28 7756a2bf ole32!CComClassInfo::GetPathFromDarwinDescriptor+0xf8
    0868ee48 77500081 ole32!CComClassInfo::GetDarwinIdentifier+0x37
    0868ef08 774ffa72 ole32!CComClassInfo::GetClassContext+0xec
    0868ef6c 774ff5af ole32!CComCatalog::GetClassInfoInternal+0x3e5
    0868ef90 77500920 ole32!CComCatalog::GetClassInfoW+0x1c
    0868efa8 77511062 ole32!GetClassInfoFromClsid+0x24
    0868efec 77500b9c ole32!CClassCache::GetClassObjectActivator+0x79
    0868f01c 774ff0d2 ole32!CClassCache::SearchForLoadedClass+0x4a
    0868f100 774ff1a3 ole32!ICoCreateInstanceEx+0x15a
    0868f128 774ff172 ole32!CComActivator::DoCreateInstance+0x28
    0868f14c 774ff1e0 ole32!CoCreateInstanceEx+0x1e
    0868f17c 0bf48b63 ole32!CoCreateInstance+0x37

    Does anybody has an Idea about this?

    Regards,

    Monday, March 25, 2013 4:42 PM

Answers

  • On 3/25/2013 12:42 PM, Optimus22 wrote:

    I have COM component, which is delivered through MSI. I have some issue where I can see popup of msi trying to re-install the components again, this happens while application is executing. When I debugged it, I noticed that for one of the CoCreateInstance for the component, COM API is internally invoking MSI installer. I am not able to understand why is this happening.

    http://robmensching.com/blog/posts/2007/3/12/robmens-recommendation-do-not-advertise-com-information-in-msi


    Igor Tandetnik

    • Proposed as answer by Elegentin Xie Thursday, March 28, 2013 11:27 AM
    • Marked as answer by Elegentin Xie Wednesday, April 3, 2013 7:22 AM
    • Unmarked as answer by Optimus22 Friday, April 5, 2013 5:30 AM
    • Marked as answer by Optimus22 Friday, April 12, 2013 6:10 AM
    Monday, March 25, 2013 5:00 PM

All replies

  • On 3/25/2013 12:42 PM, Optimus22 wrote:

    I have COM component, which is delivered through MSI. I have some issue where I can see popup of msi trying to re-install the components again, this happens while application is executing. When I debugged it, I noticed that for one of the CoCreateInstance for the component, COM API is internally invoking MSI installer. I am not able to understand why is this happening.

    http://robmensching.com/blog/posts/2007/3/12/robmens-recommendation-do-not-advertise-com-information-in-msi


    Igor Tandetnik

    • Proposed as answer by Elegentin Xie Thursday, March 28, 2013 11:27 AM
    • Marked as answer by Elegentin Xie Wednesday, April 3, 2013 7:22 AM
    • Unmarked as answer by Optimus22 Friday, April 5, 2013 5:30 AM
    • Marked as answer by Optimus22 Friday, April 12, 2013 6:10 AM
    Monday, March 25, 2013 5:00 PM
  • Hi Igor,

    Apologies for un marking your response as an answer, I know that it is the correct answer. But I had doubt related to this, so I thought I ll mark your response as an answer after I get my doubts clear :D

    Your link lead me to something called as "Darwin Descriptor". I read the doc at msdn, and what I understood is, MSI will check for the health of the component (using "Darwin Descriptor") just before using it. In my case because it is a COM component, when application create an Instance using CoCreateInstance API, MSI will first check for the components health. In this case MSI launches the Installer cause, it founds file related to component either missing, or corrupted. Missing is understood, but if my component dll or exe is healthy after installation, what are the chances of it getting corrupted. To be specific, if anybody knows, what are the possible reasons of file being corrupted.

    If there is some memory leak or heap corruption in my component, can that lead to corruption of the exe or dll of component?

    What are the ways of detecting whether some third party application is corrupting my COM component. One I have known is using procmon, which has filemon and regmon integrated into it.

    Regards,


    • Edited by Optimus22 Friday, April 5, 2013 5:43 AM
    Friday, April 5, 2013 5:41 AM
  • On 4/5/2013 1:41 AM, Optimus22 wrote:

    Your link lead me to something called as "Darwin Descriptor". I read the doc at msdn, and what I understood is, MSI will check for the health of the component (using "Darwin Descriptor") just before using it. In my case because it is a COM component, when application create an Instance using CoCreateInstance API, MSI will first check for the components health. In this case MSI launches the Installer cause, it founds file related to component either missing, or corrupted. Missing is understood, but if my component dll or exe is healthy after installation, what are the chances of it getting corrupted. To be specific, if anybody knows, what are the possible reasons of file being corrupted.

    Most likely, your object, when running, deletes some file or registry entry that was created by the MSI and is considered part of the same MSI component. Perhaps some kind of "is this the first run?" indicator. MSI detects that this file or registry entry is missing, and insists on recreating it.


    Igor Tandetnik

    Friday, April 5, 2013 5:52 AM