因为您正在运行x64操作系统和x64 Office,所以您不需要使用Wow6432Node
- 它只是为了在x64操作系统上反射32位应用程序的注册表。适合您使用的正确注册表子项如下....
HKEY_LOCAL_MACHINE\Software\Microsoft\Office\Outlook\Addins\[add-in ID]
在您的VSTO清单路径值后面放置一个管道和“vstolocal”标志,如下所示:
在 HKLM \ Software \ Microsoft \ Office \ Outlook \ Addins \ MyVSTOAddIn 处
清单=“C:\ Program Files \ Publisher \ MyVSTOAddIn \ MyVSTOAddIn.vsto | vstolocal”
并设置EnableLocalMachineVSTO标志,如下所示:
在 HKLM \ Software \ Microsoft \ Office \ 14.0 \ Common \ General 处
(DWORD) EnableLocalMachineVSTO = 1
此外,如果您要安装64位版本的Windows,则必须在另一个位置使用两个值启用本地机器安装:
在 HKLM64 \ SOFTWARE \ Microsoft \ VSTO Runtime Setup \ v4 处
(DWORD) EnableVSTOLocalUNC = 1
(DWORD) EnableLocalMachineVSTO = 1
(参见:http://support.microsoft.com/kb/2022442)
无需SideBySide、PromptingLevel、VSTO\Security\Inclusion和Active Setup\Installed Components“StubPath”!只需安装和运行。
添加于2013年10月3日...
还有一点需要注意:在Win64中,Outlook 2010会进一步难以信任VSTO插件,除非您使用真实的代码签名PFX对其进行签名,并将证书放置在用户计算机的 Trusted Publishers 存储中。我编写了这个命令行实用程序,并将PFX嵌入到可执行文件中,以使证书成为安装过程的一部分。要访问本地计算机的Trusted Publishers存储,必须以管理员身份运行此程序:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.IO;
namespace TrustCert
{
class Program
{
static void Main(string[] args)
{
string msg = "";
try
{
byte[] pfx;
var assembly = typeof(Program).Assembly;
string pfxName = "";
foreach (string mr in assembly.GetManifestResourceNames())
{
if (mr.Contains("MyPfxName"))
{
pfxName = mr;
break;
}
}
using (var stream = assembly.GetManifestResourceStream(pfxName))
{
pfx = new byte[stream.Length];
stream.Read(pfx, 0, pfx.Length);
}
X509Certificate2 cert = new X509Certificate2(pfx, "pfxPassword");
X509Store store = new X509Store(StoreName.TrustedPublisher
, StoreLocation.LocalMachine);
store.Open(OpenFlags.ReadWrite);
store.Add(cert);
store.Close();
msg = "Certificate installed";
}
catch (Exception e)
{
msg = e.ToString();
}
Console.WriteLine(msg);
}
}
}