I want to deploy a VSTO 3 Application Level Word 2007 addin that I’ve written with Visual Studio 2008. I see that WiX has an extension named WixOfficeExtension that looks like it might have this functionality, but I can’t find any documentation for it, and I can’t discern it’s purpose from the source code.
Has anyone attempted this before, and were you able to pull it off successfully?
This is the code I ended up using. I basically ported the examples from MSDN to use WiX.
Note: This specific solution is only for a Word 2007 addin, but the case for Excel is very similar. Simply modify the registry/component checks and keys/values according to the aforementioned MSDN Article.
Inclusion List Custom Action
In order to run addins with full trust, it must be added to the Inclusion List for the current user. The only way to do this reliably is with a custom action. This is a port of the custom action in the article to the new Deployment Tools Foundation included with WiX.
To use it, create a new DTF project called VSTOCustomAction and add CustomAction.cs.
CustomAction.cs
Wix Fragment
We obviously need the actual WiX file to install the addin. Reference it from your main .wcs file with
Addin.wcs
Hope that this saves some time for someone out there.