ComAddIn [Error] The Ribbon/COM add-in helper required by add-in could not be registered

62 views
Skip to first unread message

Aravind Govindarajan

unread,
Jul 12, 2024, 9:34:10 AM (10 days ago) Jul 12
to Excel-DNA
Greetings, 

We have been using ExcelDNA for our add-in for quite a few years now. Currently, we are using ExcelDNA version 1.1.1. We usually advise our customers not to have any group policies that disable the add-in, but one of the customers have group policies that they are obliged to use for security purposes, and by default it blocks/disables our add-in. When the add-in management in group policy is disabled, the add-in loads and functions as expected.

Now when they try to whitelist our add-in just by the add-in name, they still get the "ComAddIn [Error] The Ribbon/COM add-in helper required by add-in could not be registered" error while loading the add-in. When checking the Disabled items, they see the DNA value for the add-in. If they whitelist our add-in along with the DNA value, they are able to load the add-in successfully, however this is not an optimal solution, since DNA value changes from one system to another. 

The have also tried un-checking "“Require Application Add-ins to be signed by Trusted Publisher” option in Trust Center, and have also added our code signing certificate as a Trusted Publisher in Trust Center, but the issue still persist.

We read in this forum that having McAfee security in the environment could affect the add-in, but they are only using Windows Defender for endpoint security and not McAfee.

It would be very helpful if Govert or anyone can offer possible solutions or troubleshooting steps since this is a time sensitive project. 

Thanks in advance,
Aravind

Sergey Zhilyakov

unread,
Jul 13, 2024, 2:05:14 AM (9 days ago) Jul 13
to exce...@googlegroups.com
Hi Aravind,

we had a similar problem. Many companies nowadays activate group policies due to increasing security risks. Suggesting to disable group policies may not be practical. Therefore, we have written a guide for IT professionals explaining how to enable our add-in to comply with group policies. The document includes the two topics you have already mentioned:
  • Policy: Require Application Add-in to be signed by Trusted Publisher - Our distribution package includes a public code signing certificate, so the clients can easily add it to the list of trusted publishers.
  • Policy: Block unmanaged add-ins - The add-in has to be explicitly added to a list of managed add-ins. To do so, the administrators have to add the name of XLL file(s) and also the name of the Ribbon/COM add-in helper to this list. 
The name of the Ribbon/COM add-in is taken from the ProgId attribute of the class that implements the Ribbon (e.g., 'FooBar' in the example below). If you don't have this attribute, the name is selected automatically and is not static, as you have already noticed.

So all you need to do is to add the ProgId attribute to your Ribbon class.

[ComVisible(true)]

[ClassInterface(ClassInterfaceType.AutoDispatch)]

[ProgId("FooBar")]

[Guid("...")]

public class MyRibbonExcelRibbon

{

}


Best regards,
Sergey

--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/33a21c27-3eb6-4451-b4b2-c96493f67e00n%40googlegroups.com.
Message has been deleted

Aravind Govindarajan

unread,
Jul 16, 2024, 11:39:12 PM (5 days ago) Jul 16
to Excel-DNA
Hello Sergey,

Thanks for your detailed response. Just curious, I did add ProgId attribute to our Ribbon class and I was hoping to see that in the Registry but I couldn't find that anywhere. I thought it would show up in "Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes". I also looked up in couple other places, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\<application>\Addins and HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\<application>\Addins, but no luck.

 I was able to print the ProgId in our add-in source code using "Marshal.GenerateProgIdForType(this.GetType())" successfully though.

Regards,
Aravind
Reply all
Reply to author
Forward
0 new messages