This time I will focus on distributing Outlook Security Manager via ClickOnce, but without using the Add-in Express tools. I will tell you how to create a simple ClickOnce installer for a usual Windows Forms application by using the Reg Free COM technology. Those who did not read the first part of my HowTo for Deploying Outlook Security Manager with ClickOnce using Reg Free COM, part 1, I suggest that you look it though. So, here we go!
Step-by-step instructions:
- Create a new Windows Forms Application in your preferred language (now it doesn’t matter what language you use).
- Go to the References folder of the newly created project and add a new COM reference (see the COM tab of the Add Reference dialog of Visual Studio). See the secman record in the list.
- Select the just added reference and set its Isolated property to true.
- Add the security manager component to the form by selecting it in the Toolbox and dragging to the form instance in the forms designer. (If you don’t have a security manager item in the Toolbox window, you need to add it by using the Choose Items item of the Toolbox context menu).
- Return to the References folder of your project and set the Copy Local property of the SecurityManager.2005 reference to true.
- Now you can generate a ClickOnce installer. Select the add-in project in the Solution Explorer. Right click on it and select the Publish context menu item.
That’s all. As you see, deploying Outlook Security Manager using ClickOnce is as easy as it can possibly be. You just need to bear in mink two important things:
- Set the Isolated property of the secman.dll to true.
- Set the Copy Local property of the SecurityManager.2005.dll reference to true.






2 Comments
Hi Thanks for this useful article. Unfortunately I could not make it work with a Setup project.
I have an adx Outlook addin using secman. I followed your instructions using VS2010. I noticed a couple of minor differences: when I added a COM ref for secman it read secman 1.0 Type Library. When I looked at the Copy Local property of SecurityManager.2005 it was already set to True. The manifest file as created but it was called Native.MyAddin.manifest.
I then built an ADX Setup project.The dependencies picked up both secman.dll and SecurityManager.2005.dll. Both had their Register properties set to DoNotRegister.
When I installed the addin everything was OK until I did the first operation that calls secman and I got the secman.OutlookSecurityManager COM object is not registered. Looking in the installed program folder the add in is there along with the manifest (now called MyAddin.manifest) and secman.dll and SecurityManager.2005.ddl
I tried this on two machines with different version of windows and Outlook but got the same result.
Have I missed something?
Hi Mike,
Please make sure that you set the Isolated property of the secman.dll reference to true. Please see this article for more information about using the Reg Free COM technology with add-ins: HowTo: Deploy Outlook Security Manager with ClickOnce using Reg Free COM.