How to deploy a word ribbon

775 Views Asked by At

Hi I inherited a word ribbon project. I need to create an installer but first I would like to manually install it(i.e. copy files and run commands in command prompt).

The problem is that I don't know how to deploy the ribbon onto another PC. All I know is that I created a word ribbon in VS and when I run it, word opens and the ribbon appears.

I need to be able to deploy it on word 2007 onwards, 32 and 64 bit where available.

Thank you

2

There are 2 best solutions below

0
On

You can create a ClickOnce installer by clicking Publish on your Visual Studio project in the Solution Explorer or by editing the registry.

0
On

I would recommend to create an MSI for deploying your add-in, this is the most used distribution system from Windows, that has built-in support for silent installation, repair, rollback and uninstall. So you can easily have your clients deploy it through Active Directory/GPO or SCCM if they need to.

When using a MSI to deploy the addin you basically copy your add-in resources/files in the desired installation folder and create the registry entries as mentioned by Patrick.

I recommend installing the addin per user, that is to install the files under APPDATA folder and the registry entries under HKCU. Installing per-machine will require admin privileges from your users (maybe not all will have that privileges) and you will also have to work much more to see where to write the registry entries under HKLM, because here you have the key "Wow6432Node" dedicated to 32 bit applications, so based on the edition of WIndows and that of Office you need to see if you will need to write under "HKLM\Software\Office..." or under "HKLM\Sofware\Wow6432Node\Office...". When you install per user under HKCU this problem is gone as under HKCU\Software there is not registry redirection, so the extension will work for all 32 and 64 bit machines/flavors of Office. Also, installing the extension per-user will automatically give your users the possibility to install different versions of the add-in on different accounts from the same machine, if this will ever be needed.

A very important thing, you should have a launch condition in your MSI for Word 2007, so that the users which don't have installed cannot install your add-in also. All tool authoring tools should be able to set this launch condition quite easily.

Also, you should digitally sign your MSI and addin with a code signing certificate (acquired from a certified vendor, like VeriSign, Thawtee, etc...).

To create the MSI package you have multiple options, but basically you can use any tool that is capable to create MSIs, as long as you create the registry entries correctly. For example Advanced Installer (the tool on which I work on) has a nice wizard that just asks what version of Office you target, asks you the files you want to install and it automatically handles the rest for you. You can have it integrate with VS so you build the MSI directly from your VS solution if desired. As for the launch condition, it is just one click away in the Advanced Installer GUI, no need to do any scripting.