This post was migrated from my old WordPress installation and later from my Ghost installation and was initially published back in September 2013.
I’m currently in the end phase of a really nice project using Add-in Express to create plugins for Microsoft’s Office suite. While it comes with support for generating a WIX-installer for you which works fine I always liked NSIS more and have good templates ready for my own branded installers.
Breaking the WIX-installerscript that was generated apart wasn’t that hard thankfully. The important parts, i.e. registering the addins, was easy to extract and relies on the adxregistrator.exe and AddinExpress.MSO.2005.dll which is available from the Add-in Express installation folder. So by embedding those in my project and then calling adxregistrator.exe to do the actual registration made this simple enough. It’s important to remember to keep adxregistrator.exe after the installation though since it’s needed to uninstall the application afterwards.
The CheckAppRunning code is needed if you want to check if any of the office applications are running (might interfere with the installer). You will also need to install the FindProc-plugin into your NSIS-plugins folder.