Search code examples
.netoutlookregistryvstooutlook-addin

Machine wide Outlook VSTO add-in missing


I successfully registered a machine wide Outlook addin, by registering in HKLM locations

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Outlook\Addins\MyAddIn

and

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Office\Outlook\Addins\MyAddIn

But after tinkling around and deleting the key to my addin, I can no longer see it even after re-registering. It's not listed in "COM Add-ins" nor in disabled add-ins

It only works if I install the addin to the HKCU hive

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\Outlook\Addins\MyAddIn

On another computer works fine

Update:

I am using Wix Toolset to create the MSI, and have full admin on my test machines. I (loosely) followed https://learn.microsoft.com/en-us/visualstudio/vsto/deploying-a-vsto-solution-by-using-windows-installer?view=vs-2022 to create my MSI, it installs and uninstalls fine, and my reg keys are correct

Wix snippet to create reg keys

<DirectoryRef Id="TARGETDIR">
  <Component Id="RegistryEntries" Guid="*">
    <RegistryKey Root="HKLM" Key="SOFTWARE\WOW6432Node\Microsoft\Office\Outlook\Addins\MyAddIn">
      <RegistryValue Type="string" Name="Description" Value="MyAddIn" />
      <RegistryValue Type="string" Name="FriendlyName" Value="My Add-in" />
      <RegistryValue Type="integer" Name="LoadBehavior" Value="00000003" />
      <RegistryValue Type="string" Name="Manifest" Value="file:///[INSTALLFOLDER]MyAddIn.vsto|vstolocal" />
    </RegistryKey>
    <RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\Office\Outlook\Addins\MyAddIn">
      <RegistryValue Type="string" Name="Description" Value="MyAddIn" />
      <RegistryValue Type="string" Name="FriendlyName" Value="My Add-in" />
      <RegistryValue Type="integer" Name="LoadBehavior" Value="00000003" />
      <RegistryValue Type="string" Name="Manifest" Value="file:///[INSTALLFOLDER]MyAddIn.vsto|vstolocal" />
    </RegistryKey>
  </Component>
</DirectoryRef>

<Directory Id="TARGETDIR" Name="SourceDir">
  <Directory Id="$(var.ProgramFiles)">
    <Directory Id="INSTALLFOLDER" Name="$(var.ProductFolder)" />
  </Directory>
</Directory>

If I (leave everything as is and) only change reg key settings "SOFTWARE\[WOW6432Node\]Microsoft\Office\Outlook\Addins\MyAddIn" to "SOFTWARE\[WOW6432Node\]Microsoft\Office\Outlook\Addins\AnotherAddIn" Outlook picks up the addin on my machine fine

What I need help understanding is what could cause Outlook to ignore an add-in installed into HKLM. From above I think we can safely toss out reg key permission issue


Solution

  • I guess it was a noob error, but in case it may be of help to anyone else. In the course of testing and development I ended up with a registration for my add-in in ClickToRun, this caused Outlook to not look in HKLM hive for the add-in

    The specific location is HKLM\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\Microsoft\Office\Outlook\AddIns

    Outlook was able to pick up my add-in after I removed the rogue registration at the above location