Add-in is not registered

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

Add-in is not registered
The add-in registry keys are missing in the locations given in Locating COM Add-ins in the Registry. 
thiede




Posts: 38
Joined: 2016-07-05
Hi!

My Add-In is not registered in Outlook 2010 on Windows 7 and Outlook 2013 on Windows 8 but works fine in Outlook 2016 on Windows 10.

I try to install per-machine add-ins:
add-in module: RegisterForAllUsers = True
adxregistrator.exe: /privileges=admin

I use a WiX Setup.
That's my CustomAction:

<CustomAction Id="InstallADX_PerMachine" BinaryKey="adxregistrator_exe" Execute="deferred" ExeCommand="/install=&quot;[INSTALLFOLDER]$(var.ApplicationExecutable)&quot; /privileges=&quot;admin&quot;" Impersonate="no" />

That's the call of my CustomAction at InstallExecuteSequence:

<Custom Action="InstallADX_PerMachine" After="SelfRegModules">NOT Installed AND NOT UPGRADINGPRODUCTCODE</Custom>


The installation via msi finishes without error. And in the adxregistrator.log are no errors or warnings but there are no registry entries in HKCU/HKLM\Software\Microsoft\Office\Outlook\Addins for my Add-In. My Add-In is not shown in the Add-In list in Outlook options.

That's my adxregistrator.log for Windows 7 with Outlook 2010:

Add-in Express Registrator Log File: 01/12/2017 14:43:09

Installation directory: C:WindowsInstaller
Registrator version: 8.4.4395.0
Operating System: Microsoft Windows 7 Service Pack 1 (build 7601), 32-bit
Process Owner: System
Command Line: "C:WindowsInstallerMSIC364.tmp" /install="C:Program FilesOPTIMAL SYSTEMSenaio redlineOutlook Add-InOptimalSystems.Integration.OutlookAddin.dll" /privileges="admin"
Run 'As Administrator': Yes
Process Elevated: Yes
Integrity Level: System
UAC (User Account Control): Off
--------------------------------------------------------------
14:43:09 0172 Starting the add-in registration process.
14:43:09 0172 Loading mscoree.dll
14:43:09 0172 Success.
14:43:09 0172 .NET Framework installation directory: 
14:43:09 0172 The latest version of .NET Framework: 'v4.0.30319'
14:43:09 0172 Loading CLR: v4.0.30319.
14:43:09 0172 Calling CLRCreateInstance method.
14:43:09 0172 Success.
14:43:09 0172 Calling GetRuntime method.
14:43:09 0172 Success.
14:43:09 0172 Checking if the hosting API of .NET Framework v4.0 beta is installed.
14:43:09 0172 The hosting API is up to date.
14:43:09 0172 Calling GetInterface method for the CorRuntimeHost interface.
14:43:09 0172 Success.
14:43:09 0172 Starting CLR...
14:43:09 0172 Success.
14:43:09 0172 Getting the CLR version.
14:43:09 0172 The CLR v4.0.30319 has been initialized successfully.
14:43:09 0172 Creating a new domain setup.
14:43:09 0172 Success.
14:43:09 0172 The 'shadow copy' is disabled.
14:43:09 0172 Creating a new application domain.
14:43:09 0172 Success.
14:43:09 0172 Getting the base directory for the domain.
14:43:09 0172 Success. The directory is 'C:Program FilesOPTIMAL SYSTEMSenaio redlineOutlook Add-In'.
14:43:09 0172 Searching for the Add-in Express core library.
14:43:09 0172 Success. The 'AddinExpress.MSO.2005.dll' file is found.
14:43:09 0172 Creating an instance of the 'AddinExpress.Deployment.ADXRegistrator' class.
14:43:09 0172 Assembly identity is 'AddinExpress.MSO.2005'.
14:43:09 0172 Success.
14:43:09 0172 Unwrapping the instance of the 'AddinExpress.Deployment.ADXRegistrator' class.
14:43:09 0172 Success.
14:43:09 0172 Calling the managed registration procedure (DISPID = 1610743823).
14:43:09 0172 Registration success.
14:43:09 0172 The add-in registration process is completed with HRESULT = 0.


That's my adxregistrator.log for Windows 8 with Outlook 2013:

Add-in Express Registrator Log File: 01/12/2017 14:28:12

Installation directory: C:WindowsInstaller
Registrator version: 8.4.4395.0
Operating System: Microsoft Windows 8.1 Enterprise Edition (build 9600), 32-bit
Process Owner: System
Command Line: "C:WindowsInstallerMSI5476.tmp" /install="C:Program FilesOPTIMAL SYSTEMSenaio redlineOutlook Add-InOptimalSystems.Integration.OutlookAddin.dll" /privileges="admin"
Run 'As Administrator': Yes
Process Elevated: Yes
Integrity Level: System
UAC (User Account Control): On
--------------------------------------------------------------
14:28:12 0276 Starting the add-in registration process.
14:28:12 0276 Loading mscoree.dll
14:28:12 0276 Success.
14:28:12 0276 .NET Framework installation directory: 
14:28:12 0276 The latest version of .NET Framework: 'v4.0.30319'
14:28:12 0276 Loading CLR: v4.0.30319.
14:28:12 0276 Calling CLRCreateInstance method.
14:28:12 0276 Success.
14:28:12 0276 Calling GetRuntime method.
14:28:12 0276 Success.
14:28:12 0276 Checking if the hosting API of .NET Framework v4.0 beta is installed.
14:28:12 0276 The hosting API is up to date.
14:28:12 0276 Calling GetInterface method for the CorRuntimeHost interface.
14:28:12 0276 Success.
14:28:12 0276 Starting CLR...
14:28:12 0276 Success.
14:28:12 0276 Getting the CLR version.
14:28:12 0276 The CLR v4.0.30319 has been initialized successfully.
14:28:12 0276 Creating a new domain setup.
14:28:12 0276 Success.
14:28:12 0276 The 'shadow copy' is disabled.
14:28:12 0276 Creating a new application domain.
14:28:12 0276 Success.
14:28:12 0276 Getting the base directory for the domain.
14:28:12 0276 Success. The directory is 'C:Program FilesOPTIMAL SYSTEMSenaio redlineOutlook Add-In'.
14:28:12 0276 Searching for the Add-in Express core library.
14:28:12 0276 Success. The 'AddinExpress.MSO.2005.dll' file is found.
14:28:12 0276 Creating an instance of the 'AddinExpress.Deployment.ADXRegistrator' class.
14:28:12 0276 Assembly identity is 'AddinExpress.MSO.2005'.
14:28:12 0276 Success.
14:28:12 0276 Unwrapping the instance of the 'AddinExpress.Deployment.ADXRegistrator' class.
14:28:12 0276 Success.
14:28:12 0276 Calling the managed registration procedure (DISPID = 1610743823).
14:28:16 0276 Registration success.
14:28:16 0276 The add-in registration process is completed with HRESULT = 0.


That's my adxregistrator.log for Windows 10 with Outlook 2016:

Add-in Express Registrator Log File: 01/12/2017 15:01:48

Installation directory: C:WindowsInstaller
Registrator version: 8.4.4395.0
Operating System: Microsoft Windows 10 Professional (build 14393), 32-bit
Process Owner: System
Command Line: "C:WindowsInstallerMSI65F4.tmp" /install="C:Program FilesOPTIMAL SYSTEMSenaio redlineOutlook Add-InOptimalSystems.Integration.OutlookAddin.dll" /privileges="admin"
Run 'As Administrator': Yes
Process Elevated: Yes
Integrity Level: System
UAC (User Account Control): On
--------------------------------------------------------------
15:01:48 0384 Starting the add-in registration process.
15:01:48 0384 Loading mscoree.dll
15:01:48 0384 Success.
15:01:48 0384 .NET Framework installation directory: 
15:01:48 0384 The latest version of .NET Framework: 'v4.0.30319'
15:01:48 0384 Loading CLR: v4.0.30319.
15:01:48 0384 Calling CLRCreateInstance method.
15:01:48 0384 Success.
15:01:48 0384 Calling GetRuntime method.
15:01:48 0384 Success.
15:01:48 0384 Checking if the hosting API of .NET Framework v4.0 beta is installed.
15:01:48 0384 The hosting API is up to date.
15:01:48 0384 Calling GetInterface method for the CorRuntimeHost interface.
15:01:48 0384 Success.
15:01:48 0384 Starting CLR...
15:01:48 0384 Success.
15:01:48 0384 Getting the CLR version.
15:01:48 0384 The CLR v4.0.30319 has been initialized successfully.
15:01:48 0384 Creating a new domain setup.
15:01:48 0384 Success.
15:01:48 0384 The 'shadow copy' is disabled.
15:01:48 0384 Creating a new application domain.
15:01:48 0384 Success.
15:01:48 0384 Getting the base directory for the domain.
15:01:48 0384 Success. The directory is 'C:Program FilesOPTIMAL SYSTEMSenaio redlineOutlook Add-In'.
15:01:48 0384 Searching for the Add-in Express core library.
15:01:48 0384 Success. The 'AddinExpress.MSO.2005.dll' file is found.
15:01:48 0384 Creating an instance of the 'AddinExpress.Deployment.ADXRegistrator' class.
15:01:48 0384 Assembly identity is 'AddinExpress.MSO.2005'.
15:01:48 0384 Success.
15:01:48 0384 Unwrapping the instance of the 'AddinExpress.Deployment.ADXRegistrator' class.
15:01:48 0384 Success.
15:01:48 0384 Calling the managed registration procedure (DISPID = 1610743823).
15:01:49 0384 Registration success.
15:01:49 0384 The add-in registration process is completed with HRESULT = 0.


Do you have any suggestions?

Thanks
Christopher
Posted 12 Jan, 2017 09:18:42 Top
Andrei Smolin


Add-in Express team


Posts: 14094
Joined: 2006-05-11
Hello Christopher,

thiede writes:
The installation via msi finishes without error.


You should start setup.exe. On a system with UAC turned on, this should trigger an UAC prompt immediately; if this isn't the case, then the installer contains some problem.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 12 Jan, 2017 10:59:21 Top
thiede




Posts: 38
Joined: 2016-07-05
Good morning,

thanks for your fast response. I have no setup.exe. I have only myAddIn.msi.

On my Windows 7 (with UAC off as describted in the adxregistrator.log) and Windows 8 (with UAC on) I run cmd as administrator and start my msi via
msiexec /i myAddIn.msi /L* setup.log
. "The add-in registration process is completed with HRESULT = 0." I thought that would force the msi to run as administrator and it can write the registry keys. But there are no registry entries on both systems.

But the same msi works on my Windows 10 with UAC on without using the cmd as administrator simple by double clicking the msi.

What could be wrong with my installer? Do you have some ideas?

By the way: To localize the adxregistrator.exe I use a variable. Because it writes the adxregistrator.log and works on Windows 10 I think it's OK. But it's not the recommended way. Isn't it?

<?define ADX_PATH="C:Program Files (x86)Add-in ExpressAdd-in Express for .NET" ?>
<Binary Id="adxregistrator_exe" SourceFile="$(var.ADX_PATH)Redistributablesdxregistrator.exe" />
Posted 13 Jan, 2017 02:31:32 Top
Andrei Smolin


Add-in Express team


Posts: 14094
Joined: 2006-05-11
Hello Christopher,

Two ideas:

1. If the add-in registration completes with HRESULT = 0, this means the code of Add-in Express haven't received any exceptions while registering the add-in. Still, we saw several cases when getting HRESULT = 0 didn't mean that the registry keys are created; I assume this may be caused by restricting access to the registry branch that adxregistrator modifies.

2. You might get this issue if a problem causes your installer to fail (say, modifications of the WiX project are incorrect), and if you instruct adxregistrator not to produce the log file while unregistering the add-in.

I suggest that you create a new empty add-in project, modify it by setting RegisterForAllUsers=true on the add-in module, build it, generate a WiX setup project, build the setup project, and run the installer on that machine. Do you get the same problem in this case? If yes, then your WiX project is okay and the problem relates to the settings on that machine.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 13 Jan, 2017 08:49:37 Top
thiede




Posts: 38
Joined: 2016-07-05
Hi,

I tried a little bit with all these options

/scope
/privileges
RegisterForAllUsers

and ended up with an installed Version. But I get an error while initiate NLog Logger via

private static Logger Logger = LogManager.GetCurrentClassLogger();

I tried to initiate the Logger in OnAddinInitialize. But it also give me the error: NLog Configuration system failed to initialize.

I have another Add-In (named blue) built in the same way and uses the same Logger Initialization and it works. What should be the problem with my second Add-In?
Posted 13 Jan, 2017 10:53:02 Top
thiede




Posts: 38
Joined: 2016-07-05
Hi,

I think I found an implementation error. I use OnHostApplicationInitialized as mentioned
at this post. On installing the processName is not adxregistrator but msi[4-digit-hex-no].tmp. Therefore on installing the Add-In is not initialized. And then it is not registered in registry.

I changed my code to the following.

if (processName != "outlook")
{
    InitializeComponent();
}


Do you think this is a fine way?
Posted 16 Jan, 2017 06:19:06 Top
Andrei Smolin


Add-in Express team


Posts: 14094
Joined: 2006-05-11
Hello Christopher,

Assuming that your add-in loads in Outlook *only*, this solution is okay.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 16 Jan, 2017 08:04:42 Top
thiede




Posts: 38
Joined: 2016-07-05
It helped to register my Add-In correctly but it doesn't load because of the error while initiate the Logger via LogManager.GetCurrentClassLogger();. It's the same error if I do it at the static variable definition or on Add-In-Initiate event.
Posted 16 Jan, 2017 08:28:35 Top
Andrei Smolin


Add-in Express team


Posts: 14094
Joined: 2006-05-11
Try to initialize the Logger in the AddinInitialize or OnRibbonBeforeCreate event of the add-in module.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 16 Jan, 2017 08:39:29 Top
thiede




Posts: 38
Joined: 2016-07-05
Doesn't help. On Windows 8 with Outlook 2013 it crashes.
Posted 16 Jan, 2017 09:09:56 Top