none
Can I detect when an assembly has a COM interface? RRS feed

  • Question

  • Is there a simple way to check, from powershell, if an assembly has a COM interface, so we know to call regasm on it?

    We are using powershell to run gacutil on each assembly in a directory, but then need to maintain a hard coded list of the ones which require regasm to be called as well.

    Or is it ok to just run regasm on all of them, even when some don't have a COM interface?

    Monday, May 2, 2016 9:56 PM

Answers

  • Hi Les,

    As we know, Com need to be registered to our registry.

    As far as I know, here is the path where components registered in the registry information

    HKEY_CLASSES_ROOT\CLSID

    >>Is there a simple way to check, from powershell,

    This forum is discuss and ask questions about .NET Framework Base Classes (BCL) such as Collections, I/O, Regigistry, Globalization, Reflection.  Since I am not good at powershell. If you want to know more, please redirect to Powershell forum for better support.

    Best regards,

    Kristin


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, May 3, 2016 8:56 AM
  • Btw, regarding whether you can "just run regasm on all of them", the answer is yes.

    If the binary is not .NET assembly, or if it is does not contain Type that can be registered, it'll just throw warning RA0000 and do nothing.

    Wednesday, May 4, 2016 1:49 AM
    Answerer

All replies

  • Hi Les,

    As we know, Com need to be registered to our registry.

    As far as I know, here is the path where components registered in the registry information

    HKEY_CLASSES_ROOT\CLSID

    >>Is there a simple way to check, from powershell,

    This forum is discuss and ask questions about .NET Framework Base Classes (BCL) such as Collections, I/O, Regigistry, Globalization, Reflection.  Since I am not good at powershell. If you want to know more, please redirect to Powershell forum for better support.

    Best regards,

    Kristin


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, May 3, 2016 8:56 AM
  • Btw, regarding whether you can "just run regasm on all of them", the answer is yes.

    If the binary is not .NET assembly, or if it is does not contain Type that can be registered, it'll just throw warning RA0000 and do nothing.

    Wednesday, May 4, 2016 1:49 AM
    Answerer