Deploying an Outlook AddIn

Add-in Express™ Support Service
That's what is more important than anything else

Deploying an Outlook AddIn
Simple way to register my Outlook AddIn on our workstations 
Andrew Lockwood




Posts: 50
Joined: 2014-12-29
I have built an AddIn for Outlook, and it works fine on my own computers where I have registered it from within the Delph VCL. However, I cannot work out how to install it on our other workstations that do not have Delphi installed.

With my previous addin, which I developed without AddIn Express, I was able to copy the DLL to the appropriate directory and simply register it using regsvr32.

However, this does not work with my new AddIn! Sometimes I get a message saying it has installed successfully, and other times I get a failure notification. But either way, it is still not in the list of registered COM AddIns and obviously does not work.

I have seen references to adxregistrator, but I do not have any file on my computer with that name. So what do I have to do to get this DLL working on our workstations? I do not need (or want) to build a formal installation package since it is purely for internal use. I just want a simple way of getting it working!

Thanks.
Posted 07 Sep, 2015 03:00:50 Top
Andrei Smolin


Add-in Express team


Posts: 14138
Joined: 2006-05-11
Andrew,

Running regsvr32 {path}\{add-in filename}.dll is one of the ways to register the add-in. If the add-in registers correctly, it creates (at least) three keys :

- {HKLM or HKCU}\Software\Microsoft\Office\{host}\AddIns\{your add-in ProgID}; this key contains the LoadBehavior value which is normally 3
- HKCR\{your add-in progId}\CLSID; this key contains the CLSID of your add-in
- HKCR\CLSID\{your add-in CLSID}\{other subkeys}

If your add-in doesn't create those keys on the target machine, then check if you have permissions. Say, if you start Delphi using the "Run as administrator" option then try starting regsvr32 from the Command Prompt started via "Run as administrator".

Andrew Lockwood writes:
I have seen references to adxregistrator


adxregistrator is only used in Add-in Express for Office and .NET.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 07 Sep, 2015 06:05:27 Top
Andrew Lockwood




Posts: 50
Joined: 2014-12-29
Thanks Andrei

I have finally managed to work out that the problem was that originally, I created the project with Admin privileges. I followed the guidance in the manual for changing the privileges to "User" and now it works.

I have to say that I do not understand why this was necessary - I did not have an ini file or all that additional code in the dpr file of my previous addin, so I presume this is something to do with AddIn Express as opposed to COM addins generally. But it works, so that is the main thing!
Posted 07 Sep, 2015 06:55:49 Top
Andrei Smolin


Add-in Express team


Posts: 14138
Joined: 2006-05-11
Andrew,

Great!

You install the add-in on the per-user or per-machine basis. This is determined by your requirements.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 07 Sep, 2015 08:04:26 Top
Andrew Lockwood




Posts: 50
Joined: 2014-12-29
It isn't going quite as well as I at first thought. I have managed to get it working on all the client machines, but it has been very fiddly, and I only have it working for particular users at the moment.

Originally, when it was set up as "Admin Privileges", it would only run on my user account (as an Administrator) - interestingly, I could not get it to run on another user's account, even though I temporarily added them to the Administrators group (I haven't got my head around that one yet).

When I changed it to "User Privileges", I was able to install the addin on a per user basis. However, it still did not automatically install into Outlook, so I then had to go into the COM Add In settings of Outlook and manually add it.

But what I really wanted to do was to install the addin on a per machine basis, and make it available for all users. I was able to do that with my old addin, but so far, I have been unable to do this.

Is this possible? If so, what do I need to do?
Posted 07 Sep, 2015 09:22:12 Top
Andrei Smolin


Add-in Express team


Posts: 14138
Joined: 2006-05-11
To create a per-machine add-in, you need to have the RegisterForAllUsers property of the add-in module set to true. Also, the add-in must be registered with administrative privileges. Since you use regsvr32 to register/unregister such an add-in, you need to run regsvr32 from the Command Prompt started via the "Run as administrator" command.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 07 Sep, 2015 09:37:53 Top