如何打包VSTO Word加载项,以便使用WIX部署到运行Microsoft Office 64位的64位Windows 10计算机上? [英] How do you package a VSTO Word addin for deployment to a 64-bit Windows 10 machine running Microsoft Office 64 bit using WIX?

查看:404
本文介绍了如何打包VSTO Word加载项,以便使用WIX部署到运行Microsoft Office 64位的64位Windows 10计算机上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题



我无法加载64位 Word (或以任何方式确认存在)其他可用的 Word VSTO加载项



讨论



我有一个有效的 Word VSTO加载项,我使用Visual Studio 2017在一台运行Microsoft Office 32位的64位Windows 7计算机。我使用 WIX 安装程序来部署外接程序。我已成功将加载项部署到运行32位Office的Windows 7 64位主金盘,即,该加载项可供从主金盘启动虚拟桌面的任何用户使用。请参见 Nova Sys Eng S.O。回答



Word为何不承认存在我的加载项?



事实是该加载项安装在 Program Files(x86)中问题?



WIX 安装程序的平台是 x86 是个问题吗?

解决方案

我偶然发现了



即使我在具有64位办公室的64位计算机上构建了外接程序,WIX安装程序也进行了设置,以使我在Win 10 64位金牌磁盘计算机(具有64位)上运行MSI时Office),它将注册表设置添加到HKLM\Software\Wow6432node,就像计算机具有32位Office一样。



我在HKLM\Software\Microsoft下手动创建了相同的注册表项设置,加载的插件就很好了。

因此,我必须弄清楚我需要对WIX的配置进行什么设置,以使其正确地适合具有64位办公室的计算机。



BTW,Microsoft页面


Problem

I can't get 64-bit Word to load (or acknowledge the existence of in any way) an otherwise working Word VSTO add-in.

Discussion

I have a working Word VSTO add-in that I developed using Visual Studio 2017 on a 64-bit Windows 7 machine running Microsoft Office 32 bit. I use a WIX installer to deploy the add-in. I successfully deployed the add-in to a Windows 7 64 bit "master" gold disk that runs 32-bit Office, i.e., the add-in is available to any user who brings up a virtual desktop from the master gold disk. See Nova Sys Eng S.O. answer here for details.

Now, my organization is replacing Win 7 64-bit VDIs running 32-bit Office with Win 10 64-bit VDIs running 64-bit Office. In preparation for this, I created a 64-bit Win 10 development machine, installed Office 64-bit, Visual Studio 2019, the WIX Votive2019 extension, and the WIX toolset. On this development machine, I built a release version of the add-in and installed the MSI on this development machine. When I bring up Word on this development machine, it works fine.

Next, I carried the MSI built on the development machine to the 64-bit Win 10 master gold disk machine (again, running Office 64-bit) and successfully installed the add-in (i.e., the WIX installer finished without error). I also installed the VS 2010 Tools for Office Runtime (10.0.60828 released 2018) on the 64-bit Win 10 master gold disk machine. Just like on the 64-bit Win 7 master gold disk (Office 32-bit), the add-in was installed on the 64-bit Win 10 master gold disk machine in

C:\Program Files (x86)\FooAddIn

and the registry settings are

[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Office\Word\AddIns\FooAddIn]
"FriendlyName"="Foo Add-In"
"Description"="Foo Word Add-In"
"Manifest"="C:\\Program Files (x86)\\FooAddIn\\FooAddIn.vsto|vstolocal"
"LoadBehavior"=dword:00000003

When I bring up Word on the 64-bit Win 10 master gold disk machine, the add-in does not load because, apprently, Word is unaware of its existence, i.e,. when I look at Word Options -> Add-Ins, the add-in is not present at all. When I select COM Add-ins -> GO, the COM ADD-ins dialog also does not show the add-in.

One more item:

On the development machine, the Build Config Manager look like the following, i.e., the Platform for the WIX installer program (FooAddInSetup) is set to x86, and there are no other options available.

Why won't Word acknowledge the existence of my add-in?

Is the fact that the add-in is installed in Program Files (x86) an issue?

Is the fact that the Platform for the WIX setup program is x86 an an issue?

解决方案

I stumbled across Addins for Office programs may be registered under the \Wow6432Node. The part that helped me is this:

Even though I built the add-in on a 64-bit machine that has 64-bit office, the WIX installer set things up such that when I ran the MSI on the Win 10 64-bit gold disk machine (that has 64-bit Office), it added the reg settings to the HKLM\Software\Wow6432node as though the machine has 32 bit office.

I manually created the same reg key settings under HKLM\Software\Microsoft, and the add-in loaded just fine.

So, I have to figure out what I need to do to the WIX config settings to make it right for a machine that has 64-bit office on it.

BTW, the Microsoft page Registry entries for VSTO Add-ins seems to have it backward:

这篇关于如何打包VSTO Word加载项,以便使用WIX部署到运行Microsoft Office 64位的64位Windows 10计算机上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆