Home » Visual Studio

Installing an outlook addin for all users

I try to install an outlook addin under HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE depending on the selected installation mode (just me/everyone). So I work with User/Machine Hive in the registry editor.

The installation just for the current user works perfectly. But after selecting everyone during the installation process I can't even activate the addin in Outlook. In the trust center it is marked as inactive and trying to activate it will result with an error: "This add-in is installed for all users on this computer, and can only be connected or disconnected by an administrator".

I'm pretty new to programming in vsto and registry stuff - I'm pretty new to programming in general :)

Any thoughts would be helpful.


2 Answers Found


Answer 1

This is a bit of a minefield, to say the least.  Basically, administrative installs are suppoted for Outlook 2010, but require a hotfix for Outlook 2007.  I recommend inhaling this article and its supporting references:

Deploying your vsto  2008 add-in  to All users  (Part III) - Misha Shneerson - Site Home - MSDN Blogs:


Answer 2

Thank you for this great article!

It actually helped me to get my addin  running for every user  installed on my machine.

Just a brief comment:

According to the article I had to create a DWORD value EnableLocalMachineVSTO in HKEY_LOCAL_MACHINE\Software\Microsoft\Office\12.0. This didn't work  at all. However I realized that there is another Key HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\12.0... and this did work!

I'm using vsto  4.0 rather than VSTO 3.0, i don't know but this could be the reason for the different key-name.



I try to install an outlook addin under HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE depending on the selected installation mode (just me/everyone). So I work with User/Machine Hive in the registry editor.

The installation just for the current user works perfectly. But after selecting everyone during the installation process I can't even activate the addin in Outlook. In the trust center it is marked as inactive and trying to activate it will result with an error: "This add-in is installed for all users on this computer, and can only be connected or disconnected by an administrator".

I'm pretty new to programming in vsto and registry stuff - I'm pretty new to programming in general :)

Any thoughts would be helpful.


I am making my first attempt at porting an Outlook VSTO AddIn originally targeted to 2003/2007 via VSTO SE to 2007/2010 (VSTO 3), which is of course requiring changing my deployment strategy to ClickOnce via VS 2008. At this point I am simply trying to build a deployment which is usable from a ZIP file and no update support; just the bare basics of my app.

I build and publish the app to a local directory. I have to add a couple of non-managed DLLs, so I add them to the deployment_dir\Application Files\App_VersionNum directory with a .deploy extension, remove the myappname.vsto file from this directory, load the AddIn's deployment_dir\Application Files\App_VersionNum\myappname.dll.manifest file in MageUI and repopulate the file list. I save the manifest and re-sign it (at this point with just a test cert). Of possible note is the fact that MageUI complains about there not being an entry point; I simply tell it that that is acceptable on saving.

I then open the deployment_dir\myapp.vsto manifest file from in MageUI, change the Deployment Options to Application Type: Install Locally and uncheck Include Start Location. I select the application manifest I changed above (deployment_dir\Application Files\App_VersionNum\myappname.dll.manifest), save and re-sign with the same test cert.

I zip up the contents of the deployment_dir and send it to a Windows 7 system with Outlook 2010.

I unzip the file and double-click on the .vsto file, at which point it beings to install and then I get the following exception:

From: file:///C:/Users/****/Downloads/****** for Microsoft Outlook 2007-2010/****** for Microsoft Outlook 2007-2010.vsto

************** Exception Text **************
System.InvalidOperationException: The method you call cannot work on installed applications.
   at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.GetManifests(TimeSpan timeout)
   at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()


Searching for this error yielded only a single topic here which had no real explanation or replies. Hopefully this is something simple which eludes me completely.

Thanks for your help!



I am having problems installing a VSTO3.0 add in for Outlook 2007 on windows xp. This is installed with an msi setup project so we get it installed for all users. I have followed all the necessary procedures outlined in http://blogs.msdn.com/b/mshneer/archive/2007/09/05/deploying-your-vsto-add-in-to-all-users-part-i.aspx. The installer packages up all the prerequisites (vsto and pias) and these install correctly.

It may be worth pointing out that what I currently have is working fine on some machines, but I have hit two problematic machines! All the machines are XP sp3 and are equipped with the same windows updates and we are struggling to find any differences. There is a group policy involved which elevates privileges for Windows Installer.

So when the user runs up Outlook, I can see that all the correct registry keys are being deployed to HKEY_CURRENT_USER and it is attempting to load the add in. However it then hangs Outlook causing it to crash. I have tried VSTO_SUPPRESSDISPLAYALERTS and VSTO_LOGALERTS and I get nothing.

If I install the vsto file manually i.e. not manifest=[Path to vsto]|vstolocal everything works fine. What would cause the use of |vstolocal to hang Outlook? Permissions (user is an administrator)? On these same machines I also have a Word addin which is deployed the same way (|vstolocal) and this has no problems!

Apologies for the rant but I'm out of ideas!






Can we install a VSTO Outlook Addin in a network path/UNC path and still load the addin.



Hi All,

I have developed an Outlook AddIn and created a setup file as followed by this walkthru with HKCU and HKLM registry keys. For the administrator it works perfectly but for non admin users, the outlook addin DOESN'T load at all.

For admin:


For Non-admin users:
They CANNOT leverage Outlook 2007 addins as AddIn is not all loaded. 
Moreover, HKCU abd HKLM entries are not there!!!

I have readMisha Shneerson and this article where they suggest use to InstallAllUsers property to fix this issue but it did not help me. Non admin users cannot see the addin. 

1) Do we have any solutionto fix this issue?? Do we need some additional configuration during the setup of Outlook 2007 addin? 

2) Can a administrator install the addin on all users machines in a network??
Administrator need to distribute the users a MSI file and users can click to so that they can view the Outlook 2007 add in?

Please advice me.
Thank you.




i tried HKLM-to-HKCU propagration mechanism based on this link http://blogs.msdn.com/b/mshneer/archive/2007/09/04/deploying-your-vsto-add-in-to-all-users-part-i.aspx . but the propagation is not working...

the following steps that i did

create "test.reg" file and the following text put inside the file

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\User Settings\TestPropagation] "Count"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\User Settings\TestPropagation\Create\Software\Microsoft\Office\TestKey]

And then run the Excel application..

After that i check it registry "HKCU\Software\Microsoft\Office\TestKey", i can't find it under HKUC.

Please advise which step i need to configure it for propagation.

Thanks in advance 


I have developed an Outlook 2007 add-in VS 2008. I had to register this in HKLM to work for all users on a multi-user environment/terminal server.

It worked pretty smoothly quite a long time on a couple of terminal servers. But I noticed an abnormal behaviour recently on one of the TS, that is... the add-in works for everyone except for a single person, who is infact the owner of the company!

This person worked with the add-in on the servers for some days and now found that it is disabled for him from the trust center; and was not able to enable it since he was also having limited access to that machine like all other users. But the add-in requires to have administrative priviledge to enable it.

I am not getting any reason behind this situation, but need to provide a quick solution/fix so that it never happens in the future.

Is there anyone who was having this problem and can suggest me something on this?

Thanks in advance...

-Jahedur Rahman


I am working on an outlook 2003 addin where we are using WPF user control embedded in a Windows form using ElementHost.

This app crashes on only few machines intermittently. After analyzing crash dump,the WPF rendering thread seems to be causing this crash.The stack trace in the windbg looks like

p movs dword ptr es:[edi],dword ptr [esi]

EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff)
ExceptionAddress: 7814500a (msvcr80!memcpy+0x0000005a)
  ExceptionCode: c0000005 (Access violation)
 ExceptionFlags: 00000000
NumberParameters: 2
  Parameter[0]: 00000001
  Parameter[1]: ab386000
Attempt to write to address ab386000




LAST_CONTROL_TRANSFER: from 5404fa9b to 7814500a

2206f834 5404fa9b ab386000 261b80c0 00000080 msvcr80!memcpy+0x5a
2206f8c8 540503ee 0102e810 00000006 00000002 wpfgfx_v0300!CD3DDeviceLevel1::DrawPrimitiveUP+0x313
2206f8cc 0102e810 00000006 00000002 261b80c0 wpfgfx_v0300!CD3DDeviceLevel1::FlushBufferFan+0x1f
WARNING: Frame IP not in any known module. Following frames may be wrong.
2206f914 5408788b 00000000 261b80c0 00000000 0x102e810
2206f990 540878ef 2602e810 00000016 2602eb90 wpfgfx_v0300!CD3DDeviceLevel1::TestRenderTargetFormat+0x21e
2206f9b0 54087bd0 00000016 2602eb90 2206fbb4 wpfgfx_v0300!CD3DDeviceLevel1::CheckRenderTargetFormat+0x5b
2206fad4 54086c70 541870d0 26047da8 00000000 wpfgfx_v0300!CD3DDeviceManager::CreateNewDevice+0x2c3
2206fbe0 5401f473 541870d0 26047da8 000804e2 wpfgfx_v0300!CD3DDeviceManager::GetD3DDeviceAndPresentParams+0x1c1
2206fc58 5401efd6 26047da8 000804e2 00000000 wpfgfx_v0300!CHwDisplayRenderTarget::Create+0x39
2206fd98 5401f1b6 26047da8 000804e2 00000000 wpfgfx_v0300!CDesktopRenderTarget::Init+0x210
2206fdbc 5401f290 26047da8 000804e2 00000000 wpfgfx_v0300!CDesktopRenderTarget::Create+0xfa
2206fdf8 5401f339 0020cc18 26047da8 000804e2 wpfgfx_v0300!CMILFactory::CreateDesktopRenderTarget+0xc5
2206fe30 5400becc 00000000 0b8c2858 00000000 wpfgfx_v0300!CSlaveHWndRenderTarget::EnsureRenderTargetInternal+0xef
2206febc 5400be78 2206fedb 0b8b62a4 2206ff6b wpfgfx_v0300!CSlaveHWndRenderTarget::Render+0x17
2206fedc 54007523 2206ff6b 0b8b6280 00000000 wpfgfx_v0300!CRenderTargetManager::Render+0x2e
2206fef4 540075d6 2206ff6b 0b8c2730 0b8b6288 wpfgfx_v0300!CComposition::Render+0x21
2206ff58 54007667 2206ff6b 0b8b6288 008b6288 wpfgfx_v0300!CComposition::ProcessComposition+0xf3
2206ff6c 540076a2 2206ff87 00000001 0b8c2730 wpfgfx_v0300!CComposition::Compose+0x3e
2206ff88 5400717b 0b8c2730 0b8c26d0 0b8b6288 wpfgfx_v0300!CPartitionThread::RenderPartition+0x1c
2206ff9c 5400b68e 79e820a6 0000000d 0b8c2730 wpfgfx_v0300!CPartitionThread::Run+0x48
2206ffb4 7c80b729 0b8c2730 79e820a6 0000000d wpfgfx_v0300!CPartitionThread::ThreadMain+0x1e
2206ffec 00000000 5400b670 0b8c2730 00000000 kernel32!BaseThreadStart+0x37



Hi Folks,

I have a COM Outlook addin which implements a ribbon button in Outlook 2010. It's been working just fine for quite some time. Until someone tried to load the addin in the Korean version of Outlook. The ribbon buttons show up but do not do anything when clicked.  In the debugger, I see the error message below whenever I click on the ribbon button "ERROR : Unable to load Typelibrary. (HRESULT = 0x8002801d)
 Verify TypelibID and major version specified with
 IDispatchImpl, CStockPropImpl, IProvideClassInfoImpl or IProvideCLassInfo2Impl".

I never hit my break point in the callback for this button, so something is going on in the event layer above my code I think. But I don't know what and I don't know why using the Korean version of Outlook should make any different. Anyone have any ideas?

(Sice this addin has been around awhile, it also has command bars and buttons to do the same thing. These still work (though they're shunted to the addins tab))




I would like to develop an Outlook 2007 add-in, which shows the body of an e-mail as plain text in a textbox. I would like to have the plain text like it is if you use "File -> Save as" and then choose .txt.

Unfortunately I am not able to get the real plain text from a mailitem. I already tried the following (in C#):

Via mailitem.BodyFormat you can get the format of the mail item. One of the following format are available:




What I could do now is a conversion for mail item which are not in olPlainText yet:


mailItem.BodyFormat = Outlook.OlBodyFormat.olFormatPlain;

But i.e. all URL out of HTML formatted e-mails will just be written out. The plain text version you get is not really 'clean' and really differs from what you get via "File -> Save as -> .txt"

Furthermore the mail item I am currently working with just duplicates in my inbox when I change the BodyFormat. All I want is just receiving the plain text.

Does anybody know how to I get the real plain text?

Thank you for an answer and hints in advance.



I have a situation with a customer where we have had to uninstall and re-install a vsto Excel addin. After re-install the addin is not showing at-all in the com addins list. It is not just disabled it is simply not there. 

I think that this problem is related to user permissions.

The original install was successful and the software was operating correctly. The uninstall was required due to an evaluation period expiration.

The operating system is XP and the user does not have administrative rights. The uninstall and re-install were carried out using elevated rights from the users account (i.e. an administrator carried out the operations).

Are there any issues around permissions that may be affecting this?




I am reading the OSC documentation and I am not able to verify, whether OSC is installed on Outlook 2007/2003. I've tried a couple of times to get the installed version of OSC, using but I still cannot succeed. 


p.s. I've tried with this method, but obviously there are errors

  [DllImport("msi.dll", CharSet = CharSet.Auto)]
        public static extern UInt32 MsiGetComponentPath(string szProduct, string szComponent, [Out] StringBuilder lpPathBuf, ref UInt32 pcchBuf);


p.s.2 This step is explained in the OSC documentation, but I am not very confident about how to complete it. -> http://msdn.microsoft.com/en-us/library/ff759430.aspx

Verify whether the OSC is installed by writing an installer custom action to test for the existence of the following qualified component ID:


The qualified component ID is a GUID that provides a method of single-level indirection, similar to a pointer. For more information about Windows Installer, see Roadmap to Windows Installer Documentation .


It will be awesome if someone can provide an example in C#.




I'm trying to create an msg file (just simple stuff inside, basic html or and image) but this should run without Outlook installed. So, no MAPI automation.

Any pointers or ideas ?

Thanks in advance.



I'm currently working on an Outlook addin and I'm having this problem. When users closes Outlook, sometimes it's still in the Windows processes so when users re-launched Outlook, my addin is not displayed/launched.

Do you know how to prevent this ?

Thanks !

I develop an outlook addin with WPF, but sometime the outlook menu tooltip donn't disappear.



sorry, but my english is bad.

I am developing a aplication for outlook2003 with a addin;

I need to detect when a email in the outbox is deleted or finally sended.

I can detect when a new email is send, but it go to the outbox and i dont know when it finally go.

I use the Microsoft.office.Interop.Outlook.items events.  Have the add , edit, remove event, but if i set the events for the items of the outbox he dont detect the event.

If someone can help me. thanks.



We use the Outlook Toolbar to attach emails to cases. Is it possible to change the "Set Regarding" list to only show a list of cases from a particular QueryExpression?


 Microsoft Office Project 2007 Add-in does not compatable with Outlook 2010, I'm work in PWA (EPM2007, Project server 2007),

I need from Outlook add-in enables me to:
Import my tasks and timesheet to Outlook, and view them next to my existing tasks and appointments Report on the progress of my tasks and update timesheet information from within Outlook


Outlook 2003, addin written in c# in vsto VS2003

onstartupcomplete adds button to menu.

on click of button

   1. shows form to pick parameters

          resource mailboxes chosen

          from to dates

   2. reads appointments from resource mailboxes

requested between dates requested

   3. creates and fills in an Excel worksheet with

results -- does not disconnect from excel but leaves

application open for USER to manipulate report

   4. exits


The add-in does run when button clicked

Excel spread sheet is Fine

Problem -- outlook closes together with add-in

Does anyone know why?

How can this be fixed?



I have a Outlook 2010 32 bit addin similar to To-Do bar.  It works fine.

The same code with properties in the build set to x64 platform, it freezes outlook.  When I debug, SetParent api I use to set my usercontrol to outlook causes the freeze.  I am not getting any error while I debug.  If I comment this line, Outlook works but my purpose gets defeated.

Any help or thoughts??


<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure