Some hints for Installations

Feb 28, 2012 at 9:09 AM
Edited Feb 28, 2012 at 9:09 AM

0. Requirements

This topics was tested with a signed Excel-Ribbon-AddIn for Office 2010. It should also work for 2007 with kb976477 Hotfix installed. 


1. Determine correct cmd

It depends what Office Version you use:

If you have a 32bit Office, use the 32bit-Version of cmd.exe, found in %windir%\System32\cmd.exe for 32-bit OS or %windir%\SysWoW64\cmd.exe for 64bit OS.

If you have a 64bit Office, use the 64bit-Version of cmd.exe, found in %windir%\System32\cmd.exe.

Note: Compiling the AddIn with AnyCPU enables both worlds, X86 or X64 only the corresponding favor (only Office 32bit or 64bit).


2. Determine correct regasm

It depends what .net Version you compiled against:

.net 2.0 ... 3.51: %windir%\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe

.net 4.0: %windir%\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe


3. Installation on MultiUser Environments

Only 1-time as Administrator:

- Open correct cmd (as described in 1.) Run it as an Administrator!

- Type RegAsm.exe YourAddIn.dll /codebase (with the correct path of Regasm as described in 2.)

- Open your Office and test AddIn functionallity

- Navigate in registry to HKEY_CURRENT_USER\Software\Microsoft\Office\Excel\Addins\YourAddIn and export it to a registry file, e.g. called YourAddIn.reg

1-time each user (no admin privilegues required):

- Register the created YourAddIn.reg (doubleclick)


4. Installation on SingleUser Environment

I didn't figure this out. May someone else add a comment on this topic! 

Mar 2, 2012 at 10:20 PM


thanks for this posting!

your addin runs in in 32 and 64bit office as well? ( the same assembly?)

your addin will be registered while using regasm,  you can change the hive-key in the register method from the addin himself. set current user to local machine, if you want a systemwide office addin, but this is very static. your way is better for a simple deployment(without installer), create one script for single user and one for local machine and runs the target script dynamicly.

the /codebase option creates the path to the assembly in the registry.
the com addin examples from NetOffice creates this registry codebase entry at hand in the register method, called from regasm. thats all what regasm or regsvr32 basicly do. an addin registers himself. its not necessary to use the /codebase option if you create the codebase entry in the register method.