Feb 28, 2012 at 8:09 AM
Edited Feb 28, 2012 at 8:09 AM
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!