开发者

How to register VSTO add-in from a Wix# MSI installer

开发者 https://www.devze.com 2023-01-09 16:22 出处:网络
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

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\Commo开发者_JAVA技巧n 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?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号