Adding to registry without manifest in MS Office AddIn

谁说我不能喝 提交于 2019-12-23 01:16:23

问题


I am making a Outlook 2007 AddIn in c#. So while making the setup file I need to modify the registry entries. One of them is is "Manifest" string which has the link to the AddIn's manifest file. By loading this the office application loads the AddIn. But When I looked at the WebEx registry entries it doesnot have any Manifest link.

Why is it so? How did WebEx manage to do with out having a Manifest link?


回答1:


There are (2) types of Outlook Add-ins - COM Add-ins and Exchange Client Extensions. The registry key location depends on whether you are using x86 or x64 platform.


For x86:

Exchange Client Extensions:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Exchange\Client\Extensions
Outlook COM Add-ins:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\Outlook\Addins


For x64:

Exchange Client Extensions:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Exchange\Client\Extensions
Outlook COM Add-ins:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\Outlook\Addins




回答2:


To answer your question, COM addins that implement the ID2Extensibility interface, must utilize a different method of registration. Specifically, they must register as a COM server, thus their registration is tied to the InProcServer32 keys in the registry. Basically, the machine is already aware of where to find the object by name in the Class registry and loads the appropriate DLL in that fashion.




回答3:


to answer your question, apparently there are multiple ways you can register Add-In for you Office application. One is the manifest generated by VSTO, as you already shown. I assume it is the "modern" way in C# add-in development.

But remember that Office Add-In is just plain old COM+ component. So you can make add-in in C, C++ and other languages with COM+ support as well :) To register these, you need to add certain keys to Windows registry.

Using C# and Visual Studio, you can register your C# assembly as COM component by selecting the "Register for COM Interop" option in your project settings under Build tab. This is eqvivalent to running Regasm utility which comes with .NET installation manually on your assembly (DLL).

Now, if you have your component registered, all you need to do to let Office app load your Add-In is to reference this component using the registry key in format "namespace.class_extending_appropriate_interface".



来源:https://stackoverflow.com/questions/12262922/adding-to-registry-without-manifest-in-ms-office-addin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!