Take the 2-minute tour ×

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?

share|improve this question
The biggest problem your going to have with WiX is bootstrapping all of your prereqs. .NET, VSTOR ( x86 / x64 ), and possibly Windows Imaging Components and Windows Installer 3.1 for old XP SP2. Otherwise WiX can handle all of the installer proper stuff you need to do. –  Christopher Painter Sep 19 '10 at 3:18
+1 Thanks! Using Oleg Shilo's excellent Wix# makes this possible. Latest releases include a bootstrapper which can be easily chained so that several prerequisites are installed prior to launching a MSI setup. –  wpfwannabe Sep 19 '10 at 18:59
add comment

1 Answer

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

share|improve this answer
Sorry for not mentioning this but I am targeting Office 2007 and 2010. As for interpreting VSTO files, I'd rather not to if I can. The rundll32 method seems quite nice but I am unsure how to plug it into Wix apart from using a custom action. –  wpfwannabe Aug 2 '10 at 15:08
I updated my answer with a more recent article. You don't need to call VSTOInstaller. Just write out to the registry something like file://[INSTALLLOCATION]MyAddIn.vsto|vstolocal. If you install to ProgramFiles you don't have to back it up with a certificate. –  Christopher Painter Sep 19 '10 at 3:16
I have office 2013 installed, do you know if choosing "office 2010 and later" should work? I have a question here: stackoverflow.com/questions/16843414/… –  Chris Hamilton May 30 '13 at 20:14
Typically. It depends on your specific dependencies but the registry values for the addin are not version specific. –  Christopher Painter May 30 '13 at 20:40
add comment

Your Answer


