如何从 Wix# MSI 安装程序注册 VSTO 加载项

发布于 2024-09-12 19:52:42 字数 541 浏览 1 评论 0原文

我构建了多个 Office 加载项(Excel、Word、PowerPoint 和 Outlook)。我还编写了一个基于 Wix# 的 MSI 安装程序来安装这些加载项。我已经成功地正确完成了所有操作,但现在我对如何注册加载项感到困惑。

您可以通过在 Windows 资源管理器中双击随附的 VSTO 文件以交互方式完成此操作,然后该文件就会被注册。使用 RegEdit 进行挖掘发现,调用了 rundll32.exe "C:\Program Files\Common Files\Microsoft Shared\VSTO\vstoee.dll",InstallVstoSolution %1

我发现的另一种方法是使用 %CommonProgramFiles%\Microsoft Shared 中找到的实用程序 VSTOInstaller.exe 为其提供正确的命令行。

有人有使用 Wix 或 Wix# 和 VSTO 插件的经验吗?我应该编写一个自定义操作来执行此操作,还是需要执行一些 Wix 特定的操作?

I have built several Office add-ins (Excel, Word, PowerPoint and Outlook). I have also written a single Wix#-based MSI installer to install these add-ins. I have managed to do everything correctly but now I am puzzled how to register the add-ins.

One can do this interactively by double-clicking an accompanying VSTO file in Windows Explorer and it gets registered. Digging using RegEdit reveals that rundll32.exe "C:\Program Files\Common Files\Microsoft Shared\VSTO\vstoee.dll",InstallVstoSolution %1 is invoked.

One other method I found is to use utility VSTOInstaller.exe found in %CommonProgramFiles%\Microsoft Shared supplying it the correct command line.

Has anybody any experience in using Wix or Wix# and VSTO add-ins? Should I write a custom action to perform this or is there something Wix specific that needs to be done?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

枉心 2024-09-19 19:52:42

这取决于您的目标 Office 版本。我考虑调用 VSTOInstaller,但发现它仅为当前用户注册。下面是我写的一篇博客文章,其中包含其他博客的附加链接,帮助我解决了这一切。基本上,我能够对 vsto 配置文件的功能进行逆向工程,并且几乎全部在纯 MSI/WiX 中完成,并通过一些自定义操作来注册证书并为 Office 2010 生成随机数。

VSTO 经验教训
http://blog.deploymentengineering.com/2008/04/vsto- Lessons-learned.html

编辑:那篇文章已经有几年了,Office 2007 现在“技术上”支持 HKLM AddIn 注册,就像 Office 2010 一样。此外,VSTOR 运行时也发生了变化,您可能会遇到一些新的位数问题满足于。提供了更新的文章:

Office 2010 Bitness Pain

It depends on which versions of Office you are targetting. I looked into calling the VSTOInstaller but I found it only registered for the current user. Below is a blog article that I wrote with additional links other blogs that helped me figure this all out. Basically I was able to reverse engineer what a vsto config file was doing and do it almost all in pure MSI/WiX with some custom actions to register certificates and generate random numbers for Office 2010.

VSTO Lessons Learned
http://blog.deploymentengineering.com/2008/04/vsto-lessons-learned.html

Edit: That article was a couple years old and Office 2007 now "technically" supports HKLM AddIn registration as does Office 2010. Also the VSTOR runtimes have changed and there are some new bitness issues you might have to content with. An updated article is available:

Office 2010 Bitness Pain

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文