Outlook-add-in registration fails during MSI setup but succeeds when manually called

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

Outlook-add-in registration fails during MSI setup but succeeds when manually called
 
uwekeim




Posts: 14
Joined: 2012-09-09
This is a log file of a call to adxregistrator during an MSI setup:


Add-in Express Registrator Log File: 11/25/2019 02:12:38

Installation directory: C:Program Files (x86)Kultus-BW File Transfer Microsoft Office Outlook Add-in 2
Registrator version: 9.4.4644.0
Operating System: Microsoft Windows 7 Enterprise Edition Service Pack 1 (build 7601), 64-bit
Process Owner: System
Command Line: "C:Program Files (x86)Kultus-BW File Transfer Microsoft Office Outlook Add-in 2dxregistrator.exe" /install="C:Program Files (x86)Kultus-BW File Transfer Microsoft Office Outlook Add-in 2ZetaUploaderOutlookAddIn.dll" /privileges=admin /returnExitCode=true /generateLogFile=true /logFileLocation="C:Program Files (x86)Kultus-BW File Transfer Microsoft Office Outlook Add-in 2"
Run 'As Administrator': Yes
Process Elevated: Yes
Integrity Level: System
UAC (User Account Control): Off
--------------------------------------------------------------
02:12:38 0176 Starting the add-in registration process.
02:12:38 0176 Loading mscoree.dll
02:12:38 0176 Success.
02:12:38 0176 .NET Framework installation directory: 
02:12:38 0176 The latest version of .NET Framework: 'v4.0.30319'
02:12:38 0176 Loading CLR: v4.0.30319.
02:12:38 0176 Calling CLRCreateInstance method.
02:12:38 0176 Success.
02:12:38 0176 Calling GetRuntime method.
02:12:38 0176 Success.
02:12:38 0176 Checking if the hosting API of .NET Framework v4.0 beta is installed.
02:12:38 0176 The hosting API is up to date.
02:12:38 0176 Calling GetInterface method for the CorRuntimeHost interface.
02:12:38 0176 Success.
02:12:38 0176 Starting CLR...
02:12:38 0176 Success.
02:12:38 0176 Getting the CLR version.
02:12:38 0176 The CLR v4.0.30319 has been initialized successfully.
02:12:38 0176 Creating a new domain setup.
02:12:38 0176 Success.
02:12:38 0176 The 'shadow copy' is disabled.
02:12:38 0176 Creating a new application domain.
02:12:38 0176 Success.
02:12:38 0176 Getting the base directory for the domain.
02:12:38 0176 Success. The directory is 'C:Program Files (x86)Kultus-BW File Transfer Microsoft Office Outlook Add-in 2'.
02:12:38 0176 Searching for the Add-in Express core library.
02:12:38 0176 Success. The 'AddinExpress.MSO.2005.dll' file is found.
02:12:38 0176 Creating an instance of the 'AddinExpress.Deployment.ADXRegistrator' class.
02:12:38 0176 Assembly identity is 'AddinExpress.MSO.2005'.
02:12:38 0176 Success.
02:12:38 0176 Unwrapping the instance of the 'AddinExpress.Deployment.ADXRegistrator' class.
02:12:38 0176 Success.
02:12:38 0176 Calling the managed registration procedure (DISPID = 1610743823).
02:12:44 0176 Registration success.
02:12:44 0176 The add-in registration process is completed with HRESULT = 0.


This code seems to run successfully, but when starting Outlook 2010 32-bit on Windows 7, no ribbon icon is shown. The add-in also does not appear in the Add-in settings dialog of Outlook.

In contrast, when running the same adxregistrator.exe call manually in an elevated command line, it works. The log output is:


Add-in Express Registrator Log File: 11/25/2019 02:01:45

Installation directory: C:Program Files (x86)Kultus-BW File Transfer Microsoft Office Outlook Add-in 2
Registrator version: 9.4.4644.0
Operating System: Microsoft Windows 7 Enterprise Edition Service Pack 1 (build 7601), 64-bit
Process Owner: Administrator
Command Line: "C:Program Files (x86)Kultus-BW File Transfer Microsoft Office Outlook Add-in 2dxregistrator.exe"  /install="C:Program Files (x86)Kultus-BW File Transfer Microsoft Office Outlook Add-in 2ZetaUploaderOutlookAddIn.dll" /privileges=admin /returnExitCode=true /generateLogFile=true /logFileLocation="C:Program Files (x86)Kultus-BW File Transfer Microsoft Office Outlook Add-in 2"
Run 'As Administrator': Yes
Process Elevated: Yes
Integrity Level: High
UAC (User Account Control): Off
--------------------------------------------------------------
02:01:45 0176 Starting the add-in registration process.
02:01:45 0176 Loading mscoree.dll
02:01:45 0176 Success.
02:01:45 0176 .NET Framework installation directory: 
02:01:45 0176 The latest version of .NET Framework: 'v4.0.30319'
02:01:45 0176 Loading CLR: v4.0.30319.
02:01:45 0176 Calling CLRCreateInstance method.
02:01:45 0176 Success.
02:01:45 0176 Calling GetRuntime method.
02:01:45 0176 Success.
02:01:45 0176 Checking if the hosting API of .NET Framework v4.0 beta is installed.
02:01:45 0176 The hosting API is up to date.
02:01:45 0176 Calling GetInterface method for the CorRuntimeHost interface.
02:01:45 0176 Success.
02:01:45 0176 Starting CLR...
02:01:45 0176 Success.
02:01:45 0176 Getting the CLR version.
02:01:45 0176 The CLR v4.0.30319 has been initialized successfully.
02:01:45 0176 Creating a new domain setup.
02:01:45 0176 Success.
02:01:45 0176 The 'shadow copy' is disabled.
02:01:45 0176 Creating a new application domain.
02:01:45 0176 Success.
02:01:45 0176 Getting the base directory for the domain.
02:01:45 0176 Success. The directory is 'C:Program Files (x86)Kultus-BW File Transfer Microsoft Office Outlook Add-in 2'.
02:01:45 0176 Searching for the Add-in Express core library.
02:01:45 0176 Success. The 'AddinExpress.MSO.2005.dll' file is found.
02:01:45 0176 Creating an instance of the 'AddinExpress.Deployment.ADXRegistrator' class.
02:01:45 0176 Assembly identity is 'AddinExpress.MSO.2005'.
02:01:45 0176 Success.
02:01:45 0176 Unwrapping the instance of the 'AddinExpress.Deployment.ADXRegistrator' class.
02:01:45 0176 Success.
02:01:45 0176 Calling the managed registration procedure (DISPID = 1610743823).
02:01:46 0176 Registration success.
02:01:46 0176 The add-in registration process is completed with HRESULT = 0.


As you can see, the only significant difference is the line "Integrity Level".

When it succeeds, it is "Integrity Level: High". When it fails, it is "Integrity Level: System".

My quesition:

Any chance to get registration working inside my MSI package?
Posted 25 Nov, 2019 07:04:52 Top
uwekeim




Posts: 14
Joined: 2012-09-09
I've finally resolved it.

In the "adxloader.dll.manifest" was an error: The
<loaderSettings>
section contained
privileges="user"
.

After I changed it to
privileges="administrator"
, everything worked correctly.

I came to the solution after reading the section "Deploying a per-machine Office extension via an MSI installer" in the file "C:\Program Files (x86)\Add-in Express\Add-in Express for .NET\Docs\adxnet.pdf".
Posted 25 Nov, 2019 09:00:33 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Good!


Andrei Smolin
Add-in Express Team Leader
Posted 25 Nov, 2019 10:06:12 Top