How does the AddIn Project register itself?

C

Christof Nordiek

Hi,

I created an Addin Project with the Addin-Project-Wizzard in VS2005. I added
some code from a Knowledge Base How To und built the project.
It worked, and the Addin got registered with Outlook.

Now my questions are:
How an when did the registering took place?
Whre is the informations stored, to wich Application the Addin should be
bound?
How can I unregister the AddIn?

thanks in advance

Christof
 
K

Ken Slovak - [MVP - Outlook]

The registration is stored for that user in
HKCU\Software\Microsoft\Office\Outlook\Addins\ or for all users in HKLM.
 
D

Dmitry Streblechenko

COM add-ins must also expose the regular registry keys (common to all
creatable COM objects) in HKCR or HKCU\Software\Classes

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
C

Christof Nordiek

Hi Ken and Dimitri,

thanks for your information. But I have some additional questions:

1. When were this informations written into the registry?
2. Does my project itself know, for wich applications the AddIn should be
registered? And if yes, where is this information stored and can and be
edited (including other information I entered in the wizzard)?
3. Is there a way to undo this registration other then by deleting all this
entries manually from the registration?
 
K

Ken Slovak - [MVP - Outlook]

The information is written to the registry when the project is installed and
your addin DLL is registered. Uninstallation should remove those same
registry entries.

I don't do all that much .NET work with addins, but the ones I do are using
mostly the VS installer. I haven't really played with using InstallShield
for that, although I plan to play with it. In VS if you right-click on the
setup project and select View, Registry you will see the addin settings
under the HKCU key for a single user setup or under HKLM for an all users
setup.
 
C

Christof Nordiek

Hi Ken,

this is not (yet) my problem. I didn't run any setup. I simply created an
AddIn project by selecting the shared AddIn project template from VS2005 and
after running the wizzard enterd some code from the MSDN how to and build
the program. After that I started Outlook and the AddIn was running therein.
There was also a Setup-Project created, but this isn't even build until now.
I hope this setup project will do everything needed for deployment. But then
all the information must sit anywhere in the project.
The information for the COM-regitration is in the class attributes, but I
still don't know, where the information is, e.g. wich office application
host the AddIn. (I could select one or more from several in the wizzard.)

I hope someone can give me answers to that.

Regards
Christof
 
M

Mark Beiley

Hi Christof,

I believe the visual studio project wizard creates all these registry
entries for you when you go through the wizard. I believe I read that if
you need to re-do the registry entries, you can run the setup project that
the wizard builds. I don't really use this method, but was playing with it,
and noticed this.

In my add-ins I create all these registry enties in the 'DllRegisterServer'
function, and remove them in the 'DllUnregisterServer' function. When you
install your add-in you can run 'regsvr32' and give it your DLL as an
argument. The regsvr32 will call your DllRegisterServer function, thus
making all your registry entries.

Thanks,
Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top