Multi-user Excel Add-in does not register correctly

Add-in Express™ Support Service
That's what is more important than anything else

Multi-user Excel Add-in does not register correctly
 
Henjo van Rees




Posts: 46
Joined: 2018-12-10
I register my Excel Add-in with the following commandline:


adxregistrator.exe /install="ASSEMBLY.dll" /privileges=admin


- For the current user the DLL is registered correctly as COM and Excel Add-in
- For user2 (on the same machine) it is only registered as COM add-in

When I add the following registry key manually to HKCU (as user2) or HKLM the Excel Add-in is registered and works fine:

Software\Microsoft\Office\15.0\Excel\Options\OPEN = "/R "C:\Program Files (x86)\Excel Add-in\adxloader.ASSEMBLY.dll"


I want to register the plugin as both COM and Excel Add-in to have it working for all users.

What am I doing wrong?
Posted 28 Jan, 2020 07:53:42 Top
Henjo van Rees




Posts: 46
Joined: 2018-12-10
Logfiles:

Add-in Express Registrator Log File: 01/28/2020 13:23:56

Installation directory: C:Program Files (x86)Ortec FinancePEARLPEARL Excel Add-in 8.3.1
Registrator version: 9.4.4644.0
Operating System: Microsoft Windows 10 Enterprise Edition (build 17763), 64-bit
Process Owner: Administrator
Command Line: adxregistrator.exe  /install=PEARL.dll /privileges=admin /generateLogFile=true /logFileLocation=D:dx.log
Run 'As Administrator': Yes
Process Elevated: Yes
Integrity Level: High
UAC (User Account Control): On
--------------------------------------------------------------
13:23:56 0536 Starting the add-in registration process.
13:23:56 0536 Loading mscoree.dll
13:23:56 0536 Success.
13:23:56 0536 .NET Framework installation directory: 
13:23:56 0536 The latest version of .NET Framework: 'v4.0.30319'
13:23:56 0536 Loading CLR: v4.0.30319.
13:23:56 0536 Calling CLRCreateInstance method.
13:23:56 0536 Success.
13:23:56 0536 Calling GetRuntime method.
13:23:56 0536 Success.
13:23:56 0536 Checking if the hosting API of .NET Framework v4.0 beta is installed.
13:23:56 0536 The hosting API is up to date.
13:23:56 0536 Calling GetInterface method for the CorRuntimeHost interface.
13:23:56 0536 Success.
13:23:56 0536 Starting CLR...
13:23:56 0536 Success.
13:23:56 0536 Getting the CLR version.
13:23:56 0536 The CLR v4.0.30319 has been initialized successfully.
13:23:56 0536 Creating a new domain setup.
13:23:56 0536 Success.
13:23:56 0536 Getting the add-in directory.
13:23:56 0536 Success. The directory is 'C:Program Files (x86)Ortec FinancePEARLPEARL Excel Add-in 8.3.1'
13:23:56 0536 The 'shadow copy' is disabled.
13:23:56 0536 Creating a new application domain.
13:23:56 0536 Success.
13:23:56 0536 Getting the base directory for the domain.
13:23:56 0536 Success. The directory is 'C:Program Files (x86)Ortec FinancePEARLPEARL Excel Add-in 8.3.1'.
13:23:56 0536 Searching for the Add-in Express core library.
13:23:56 0536 Success. The 'AddinExpress.MSO.2005.dll' file is found.
13:23:56 0536 Creating an instance of the 'AddinExpress.Deployment.ADXRegistrator' class.
13:23:56 0536 Assembly identity is 'AddinExpress.MSO.2005'.
13:23:56 0536 Success.
13:23:56 0536 Unwrapping the instance of the 'AddinExpress.Deployment.ADXRegistrator' class.
13:23:56 0536 Success.
13:23:56 0536 Calling the managed registration procedure (DISPID = 1610743823).
13:23:56 1064 32 bits. The 'HKCUSoftwareMicrosoftOfficeExcelAddInsPEARL.AddinModule' registry key was created successfully for the 'PEARL.AddinModule' class: LoadBehavior=3
13:23:56 1064 32 bits. The 'HKCRCLSID{22cc2716-ca95-4116-bb27-409ab16f4e65}InprocServer32' registry key was created successfully for the 'PEARL.AddinModule' class: C:Program Files (x86)Ortec FinancePEARLPEARL Excel Add-in 8.3.1dxloader.PEARL.dll
13:23:56 1064 64 bits. The 'HKCUSoftwareMicrosoftOfficeExcelAddInsPEARL.AddinModule' registry key was created successfully for the 'PEARL.AddinModule' class: LoadBehavior=3
13:23:56 1064 64 bits. The 'HKCRCLSID{22cc2716-ca95-4116-bb27-409ab16f4e65}InprocServer32' registry key was created successfully for the 'PEARL.AddinModule' class: C:Program Files (x86)Ortec FinancePEARLPEARL Excel Add-in 8.3.1dxloader64.PEARL.dll
13:23:56 1064 The '/R "C:Program Files (x86)Ortec FinancePEARLPEARL Excel Add-in 8.3.1dxloader.PEARL.dll"' registry value was created successfully for the 'PEARL.XLLModule' class.
13:23:56 1064 32 bits. The 'HKCRCLSID{6ea9c9f9-2108-3100-ae6a-22759a32e2b3}InprocServer32' registry key was created successfully for the 'PEARL.XLLModule' class: mscoree.dll
13:23:56 1064 64 bits. The 'HKCRCLSID{6ea9c9f9-2108-3100-ae6a-22759a32e2b3}InprocServer32' registry key was created successfully for the 'PEARL.XLLModule' class: mscoree.dll
13:23:56 0536 Registration success.
13:23:56 0536 The add-in registration process is completed with HRESULT = 0.
Posted 28 Jan, 2020 07:55:26 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Hello Henjo,

While a COM add-in can be registered per user or per machine, an Excel add-in may only be registered per user. Since you have both in the same assembly, the COM add-in must be per-user. Check section Deploying a per-user Office extension via an MSI installer; see the PDF file in the folder {Add-in Express}\Docs on your development PC.


Andrei Smolin
Add-in Express Team Leader
Posted 28 Jan, 2020 09:11:21 Top
Henjo van Rees




Posts: 46
Joined: 2018-12-10
Hi Andrei,

Thanks for you answer.

I just read the documentation and it indeed states that only the COM add-in can be installed per machine in HKLM.

However, when I add the registry entry for the Excel Add-in (which now is set in HKCU) to HKLM, it work for all users.
All users on the machine get the Excel Add-in as well.

Key: Software\Microsoft\Office\15.0\Excel\Options\OPEN
Value: /R "C:\Program Files (x86)\MANUFACTURER\\adxloader.APPLICATION.dll"

Is there a specific reason why adxregistrator.exe does not register the Excel Add-in in HKLM with /privileges=admin ?
Posted 29 Jan, 2020 07:25:35 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Henjo van Rees writes:
Is there a specific reason why adxregistrator.exe does not register the Excel Add-in in HKLM with /privileges=admin ?


I think you've mistaken. If you unregister your add-in and leave that registry value in HKLM, would Excel show your add-in listed in the Excel add-ins dialog? I assume it won't. At least, it doesn't do this for me.


Andrei Smolin
Add-in Express Team Leader
Posted 29 Jan, 2020 08:29:46 Top