Deploy Office 2010-2000 add-in
per-user or per-machine solutions in C#, VB.NET, C++
Add-in Express™ |
|
Per-user |
Per-machine | |
| COM Add-in | + | + |
| Excel RTD Server | + | + |
| Excel Automation Add-in | + | - |
| Excel XLL Add-in | + | - |
| Smart Tag | + | - |
Per-machine extensions cannot be installed via ClickOnce, which is a deployment technology targeted to non-administrator-privileges installations.
Installing and registering
When you run the installer on the target machine, the question arises: where to install the add-in? Note that per-user extensions are called so because a standard user is able to install them; that means that the user may install a per-user extension to any folder accessible for the user. Note that ClickOnce installers always install to ClickOnce Application cache. A per-machine extension requires administrative permissions and, consequently, only administrators can install it; the target folder must be accessible by all users of the extension.
Although, in the general case, you cannot prevent the user from choosing an incorrect folder, you can provide a valid default installation location. If you create a setup project using Add-in Express (see Creating MSI installers), the setup project wizard analyzes RegisterForAllUsers of the Add-in Express module used in your project and creates a setup project that is ready to install the files mentioned in Files to deploy to the following default locations:
|
RegisterForAllUsers = True |
RegisterForAllUsers = Flase |
| [ProgramFilesFolder][Manufacturer]\[ProductName] | [AppDataFolder][Manufacturer]\[ProductName] |
Still, installing an Office extension isn't enough. To get loaded to the corresponding Office application, your Office extension must be described correctly in the Windows Registry; see Registry keys for exact registry locations. Add-in Express writes all required information to the correct registry locations so that you usually don't even think about this.
You cannot deploy an Office extension using XCOPY because this does not create required registry entries.
Permissions required
An Office extension having RegisterForAllUsers set to False or not having that property at all, writes to HKCU when it is being registered and thus it can be registered by a standard user. Since writing to HKLM requires administrative permissions, only administrators can install (and register) a COM add-in or RTD server for all users on the PC; only these Office extension types have the RegisterForAllUsers properties in their modules.
But before being registered, the Office extension must be installed. Only the user having corresponding permissions can do this. Of course, this applies to any other software.
Deployment technologies
| You create a regular .MSI installer to install both per-user and per-machine Office extensions. To update your Office extension, you uninstall its current version and install the new one. | |
| ClickOnce |
This technology is targeted at non-admin installations; only per-user Office extensions can be installed in this way. When the user updates your Office extension, its previous version is uninstalled automatically. |
| ClickTwice :) | This is a custom MSI-based Web deployment technology. ClickTwice :) allows standard users and admins to run MSIs from the web (Internet and Intranet) for installing and updating per-user and per-machine Office extensions. |
Detailed comparison
|
Feature |
|||
| Update from the web | Yes | No | Yes |
| Post-installation rollback | Via Add/Remove Programs | No | No |
| Security permissions granted | Grants only permissions necessary for the application (deploying COM add-ins, it always requires Full Trust). | Grants Full Trust by default | Grants Full Trust by default |
| Security permissions required | Internet or Intranet Zone (Full Trust for CD-ROM installation) | Standard user or Administrator | Standard user or Administrator |
| Installation-time user interface | Single prompt | Multipart Wizard | Multipart Wizard |
| Installation of shared files | No | Yes | Yes |
| Installation of drivers | No | Yes (with custom actions) |
Yes (with custom actions) |
| Installation to Global Assembly Cache | No | Yes | Yes |
| Installation for multiple users | No | Yes | Yes |
| Add an entry to Start menu | Yes | Yes | Yes |
| Add an entry to Startup group | No | Yes | Yes |
| Add an entry to Favorites menu | No | Yes | Yes |
| Register file types | No | Yes | Yes |
| Install time registry access | HKEY_LOCAL_MACHINE (HKLM) accessible only with Full Trust permissions | Yes | Yes |
| Binary file patching | No | Yes | Yes |
| Installation location | ClickOnce application cache | Changed by the user during the installation | Changed by the user during the installation |
What technology to use?
|
Per-user extensions |
Per-machine extensions |
|
| A user runs the installer from a CD/DVD, hard disk or local network location | Windows Installer
ClickOnce ClickTwice |
Windows Installer
ClickTwice |
| A corporate admin uses Group Policy to install your Office extension for a specific group of users in the corporate network; the installation and registration occurs when a user logs on to the domain. For more details, please refer yourself to the following article on our blog: HowTo: Install a COM add-in automatically using Windows Server Group Policy | Windows Installer | - |
| A user runs the installer by navigating to a web location or by clicking a link | ClickOnce
ClickTwice |
ClickTwice |
Files to deploy
The tables below contain minimal sets of files required for your Office extension to run.
Office add-ins, XLL add-ins
|
File name |
Description |
| AddinExpress.MSO.2005.dll | Command bar and Ribbon controls, COM add-in and XLL |
| Interop assemblies | All interops required for your add-in |
| extensibility.dll | Contains the definition of the IDTExtensibility2 COM interface |
| adxloader.dll | 32-bit loader; required for Office 2000-2007, and Office 2010 32-bit |
| adxloader64.dll | 64-bit loader; required for Office 2010 64-bit |
| adxloader.dll.manifest | Loader manifest |
| adxregaddin.exe | Add-in registrator |
For an XLL add-in, the loader names include the assembly name, say, adxloader.MyXLLAddin1.dll (adxloader64.MyXLLAddin1.dll).
Excel Automation add-ins
|
File name |
Description |
| AddinExpress.MSO.2005.dll | Excel automation add-ins |
| Interop assemblies | All interops required for your add-in |
| extensibility.dll | Contains the definition of the IDTExtensibility2 COM interface |
| adxregaddin.exe | The add-in registrator |
RTD servers
|
File name |
Description |
| AddinExpress.RTD.2005.dll | Excel RTD Server |
| adxloader.dll | 32-bit loader; required for Office 2000-2007, and Office 2010 32-bit |
| adxloader64.dll | 64-bit loader; required for Office 2010 64-bit |
| adxloader.dll.manifest | Loader manifest |
| adxregaddin.exe | Add-in registrator |
Smart tags
|
File name |
Description |
| AddinExpress.SmartTag.2005.dll | Smart Tag |
| adxloader.dll | 32-bit loader; required for Office 2000-2007, and Office 2010 32-bit |
| adxloader64.dll | 64-bit loader; required for Office 2010 64-bit |
| adxloader.dll.manifest | Loader manifest |
| adxregaddin.exe | Add-in registrator |