問題描述
Outlook 在啟動時忽略加載項的 HKEY_LOCAL_MACHINE 條目 (Outlook ignoring HKEY_LOCAL_MACHINE entry for add‑in on startup)
我在 Win10 64 位上使用 VS 2017 和 .Net 4.6 開發了一個用於 Outlook 2013 64 位的 C# 加載項。
我在
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Outlook\Addins\LegalFirst.OutlookToMatter
下有所需的註冊表項 但加載項沒有被加載。
如果我將相同的註冊表項放在 HKCU 下,加載項就可以正常加載。
我希望這個加載項用於所有用戶。
插件是使用 VS 和 Windows Installer 安裝的,它正確地創建了 HKLM 條目。不確定它是否相關,但它沒有受信任的安裝程序證書。很高興提供任何其他信息。
誰能提供一些建議。
參考解法
方法 1:
An installer for 64‑bit Windows requires two registry paths because it's possible for users to run 32‑bit and 64‑bit versions of Office on a computer that runs 64‑bit Windows.
Read more about these configurations in the To specify whether you want to support per‑user or per‑computer installations section.
Finally, you may find the Deploy an Office solution by using Windows Installer article helpful.
方法 2:
Found the issue! Even though it is installed under "C:\Program Files\Microsoft Office 15\root\office15" it is a 32 bit process and so is not looking at HKLM\Software\Microsoft\Office at all but only HKLM\WOW6432Node\Software\Microsoft\Office.
Thanks to @dmitry‑streblechenko for suggesting Procmon which lead me to procexp which showed that my oulook.exe was actually a 32 bit process.
Change my installer to x86 and all is well.
(by David、Eugene Astafiev、David)