Failure to install add-in for Current User

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

Failure to install add-in for Current User
Installer and adxregistrator run without error, but addin is not activated for current user 
Ira Whitman




Posts: 56
Joined: 2010-01-21
Previously, I created the top, "Install for All Users using only a WIX-created MSI." I realized that it makes more sense for us to install for only the current user.

Therefore:
1. I've set RegisterForAllUsers=False in the properties of my ADXAddinModule (through the designer)
2. Changes my WiX installer to InstallScope="perUser" and InstallPrivileges="limit"
3. Made the post-build action for the installer project: "{my path}\adxpatch.exe" "$(TargetPath)" /UAC=Off /RunActionsAsInvoker=true
4. And set the command line arguments in the CustomAction as: /install="[INSTALLFOLDER]$(var.Modules.OI.TargetFileName)" /privileges=user

The MSI install runs without invoking a UAC elevation prompt, and reports no error. There is also no error reported by adxregistrator. However, the add-in is not initially visible in any Office application. I can find it under "Options->Add Ins" where it is listed among "Inactive Application Add-ins". I can activate it there, but only temporarily; it is inactive again the next time I launch WORD or OUTLOOK, etc.

I have tried running Adxregistrator in a command prompt, and I see the same result.
I've also searched the registry for my module, and I see each class within it listed in both HKCU and HKCR.

I'll paste the adxregistrator.log below. One thing that looks odd is the "Process Owner: Administrator". I am NOT currently logged on to the machine as Administrator.

Add-in Express Registrator Log File: 03/24/2014 14:11:24

Installation directory: C:\Source\OI\Astria.Client.SendTo\bin\Debug\
Registrator version: 7.4.4067.0
Operating System: Microsoft Enterprise Edition (build 9200), 64-bit
Process Owner: Administrator
Command Line: adxregistrator.exe /install=Modules.OI.Dll /privileges=user
Run 'As Administrator': No
Process Elevated: No
Integrity Level: Medium
UAC (User Account Control): On
--------------------------------------------------------------
14:11:24 0256 Starting the add-in registration process.
14:11:24 0256 Loading mscoree.dll
14:11:24 0256 Success.
14:11:24 0256 .NET Framework installation directory:
14:11:24 0256 The latest version of .NET Framework: 'v4.0.30319'
14:11:24 0256 Loading CLR: v4.0.30319.
14:11:24 0256 Calling CLRCreateInstance method.
14:11:24 0256 Success.
14:11:24 0256 Calling GetRuntime method.
14:11:24 0256 Success.
14:11:24 0256 Checking if the hosting API of .NET Framework v4.0 beta is installed.
14:11:24 0256 The hosting API is up to date.
14:11:24 0256 Calling GetInterface method for the CorRuntimeHost interface.
14:11:24 0256 Success.
14:11:24 0256 Starting CLR...
14:11:24 0256 Success.
14:11:24 0256 Getting the CLR version.
14:11:24 0256 The CLR v4.0.30319 has been initialized successfully.
14:11:24 0256 Creating a new domain setup.
14:11:24 0256 Success.
14:11:24 0256 Getting the add-in directory.
14:11:24 0256 Success. The directory is 'C:\Source\OI\Astria.Client.SendTo\bin\Debug\'
14:11:24 0256 The 'shadow copy' is disabled.
14:11:24 0256 Creating a new application domain.
14:11:24 0256 Success.
14:11:24 0256 Getting the base directory for the domain.
14:11:24 0256 Success. The directory is 'C:\Source\OI\Astria.Client.SendTo\bin\Debug\'.
14:11:24 0256 Searching for the Add-in Express core library.
14:11:24 0256 Success. The 'AddinExpress.MSO.2005.dll' file is found.
14:11:24 0256 Creating an instance of the 'AddinExpress.Deployment.ADXRegistrator' class.
14:11:24 0256 Assembly identity is 'AddinExpress.MSO.2005'.
14:11:24 0256 Success.
14:11:24 0256 Unwrapping the instance of the 'AddinExpress.Deployment.ADXRegistrator' class.
14:11:24 0256 Success.
14:11:24 0256 Calling the managed registration procedure.
14:11:24 0724 Connecting to the application domain of the Add-in Express loader.
14:11:24 0724 Success.
14:11:24 0724 Loading the 'modules.oi.dll' assembly.
14:11:24 0724 Success.
14:11:24 0724 Registering the 'modules.oi.dll' assembly (user).
14:11:24 0724 The ' modules.oi.dll' assembly has been registered successfully.
14:11:24 0256 The add-in registration process is completed with HRESULT = 0.
Posted 24 Mar, 2014 13:28:31 Top
Ira Whitman




Posts: 56
Joined: 2010-01-21
Oh... that's new.

I just realized that even the "Register ADX Project" command in the Build menu of Visual Studio fails to activate the add-in. It registers it, but I must still then activate it in each Office program through the Options -> Add Ins menu.

What did I do to my Module ?
Posted 24 Mar, 2014 13:40:01 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Ira,

Could you please make sure that your add-in is enabled e.g. in Excel, restart Excel and let me see the adxloader.log?

Process Owner: Administrator - this refers to the fact that you are an administrator on the PC.
Run 'As Administrator': No - this shows that you run the installer as a standard user.


Andrei Smolin
Add-in Express Team Leader
Posted 25 Mar, 2014 07:14:29 Top
Ira Whitman




Posts: 56
Joined: 2010-01-21
As I stated, my AddIn is not initially loaded when I start Outlook, Word, etc., and there is no adxloader.log (at first).

When I load the add in explicitly via the "Options->Add Ins" dialog, a log like the following one is generated.

Add-in Express Loader Log File: 03/25/2014 14:38:28:987

Startup directory: C:\Source\OI\Astria.Client.SendTo\bin\Debug\
Loader version: 7.4.4067.0
Operating System: Microsoft Enterprise Edition (build 9200), 64-bit
Process Owner: Administrator
Command Line: "C:\Program Files (x86)\Microsoft Office\Office14\OUTLOOK.EXE"
Run 'As Administrator': No
Process Elevated: No
Integrity Level: Medium
UAC (User Account Control): On
------------------------------------------------------------------------
14:38:28:990 6620 7984 Start.
14:38:28:990 6620 7984 Reading the registry key 'HKEY_CLASSES_ROOT\CLSID\{C7FB65AE-F8D7-4DDC-A160-66DC34D9096F}'
14:38:28:990 6620 7984 Success. The registry key 'HKEY_CLASSES_ROOT\CLSID\{C7FB65AE-F8D7-4DDC-A160-66DC34D9096F}' is closed.
14:38:28:990 6620 7984 Converting the '{4BA250A6-8BCA-46A6-982A-F340081187C3}' CLSID from string.
14:38:28:990 6620 7984 Success.
14:38:28:990 6620 7984 Attempting to get the class object by the '{4BA250A6-8BCA-46A6-982A-F340081187C3}' CLSID.
14:38:28:990 6620 7984 Success.
14:38:28:990 6620 7984 Creating a new instance of the add-in loader.
14:38:28:990 6620 7984 Loading mscoree.dll
14:38:28:990 6620 7984 Success.
14:38:28:990 6620 7984 Loading the configuration from the system registry.
14:38:28:992 6620 7984 Getting the latest CLR version.
14:38:28:992 6620 7984 The latest CLR version is 'v4.0.30319'.
14:38:28:992 6620 7984 The configuration has been loaded successfully.
14:38:28:992 6620 7984 Runtime version: v4.0.30319.
14:38:28:992 6620 7984 Assembly name: Modules.OI, PublicKeyToken=FCB7D2904F2C6795.
14:38:28:992 6620 7984 Class name: Modules_OI.AddinModule.
14:38:28:992 6620 7984 Registry key: CLSID\{C7FB65AE-F8D7-4DDC-A160-66DC34D9096F}.
14:38:28:992 6620 7984 Attempting to create a new instance of the managed add-in class: CLR - v4.0.30319
14:38:28:992 6620 7984 Loading CLR: v4.0.30319.
14:38:28:992 6620 7984 Calling CLRCreateInstance method.
14:38:28:992 6620 7984 Success.
14:38:28:992 6620 7984 Calling GetRuntime method.
14:38:28:992 6620 7984 Success.
14:38:28:992 6620 7984 Checking if the hosting API of .NET Framework v4.0 beta is installed.
14:38:28:998 6620 7984 The hosting API is up to date.
14:38:28:998 6620 7984 Calling GetInterface method for the CorRuntimeHost interface.
14:38:28:998 6620 7984 Success.
14:38:28:998 6620 7984 Starting CLR...
14:38:28:998 6620 7984 Success.
14:38:28:998 6620 7984 Getting the CLR version.
14:38:28:998 6620 7984 The CLR v4.0.30319 has been initialized successfully.
14:38:28:998 6620 7984 Creating a new domain setup.
14:38:29:002 6620 7984 Success.
14:38:29:002 6620 7984 Getting the add-in directory.
14:38:29:002 6620 7984 Success. The directory is 'C:\Source\OI\Astria.Client.SendTo\bin\Debug\'
14:38:29:002 6620 7984 The 'shadow copy' is disabled.
14:38:29:002 6620 7984 Creating a new application domain.
14:38:29:012 6620 7984 Success.
14:38:29:013 6620 7984 Creating an instance of the managed class. Assembly identity: 'Modules.OI, PublicKeyToken=FCB7D2904F2C6795'
14:38:29:120 6620 7984 Success.
14:38:29:120 6620 7984 Unwrapping the managed class.
14:38:29:182 6620 7984 Success.
14:38:29:182 6620 7984 Querying the add-in extensibility.
14:38:29:183 6620 7984 Success.
14:38:29:183 6620 7984 Querying the custom task panes.
14:38:29:183 6620 7984 Success.
14:38:29:183 6620 7984 Querying the ribbon extensibility.
14:38:29:183 6620 7984 Success.
14:38:29:183 6620 7984 Querying the form regions.
14:38:29:184 6620 7984 Success.
14:38:29:184 6620 7984 Getting the dispid of the 'Dispose' method.
14:38:29:188 6620 7984 Success.
14:38:29:188 6620 7984 The managed add-in class has been created successfully.
Posted 25 Mar, 2014 13:47:46 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Ira,

I suppose you need to set LoadBehavior=3 in HKCU\Software\Microsoft\Office\{host}\AddIns\{your add-in ProgID}.

Is this the case?


Andrei Smolin
Add-in Express Team Leader
Posted 26 Mar, 2014 04:29:41 Top
Ira Whitman




Posts: 56
Joined: 2010-01-21
LoadBehavior=3 is already present in the registry for Excel, Word, and Powerpoint, but not Outlook.

The complete contents of the registry key for our module within Excel, Word, Powerpoint are:

(Default) (value not set)
ADXStartMode FIRSTSTART
CommandLineSafe 0
Description AddinModule
FriendlyName Eclipse Office Integration
LoadBehavior 3

Outlook is the exception; its values are:

(Default) (value not set)
ADXStartMode NORMAL
CommandLineSafe 0
Description AddinModule
FriendlyName Eclipse Office Integration
LoadBehavior 0

Despite these differences, the observable behavior of Outlook and the other applications is the same. The module is not loaded on start-up
Posted 26 Mar, 2014 09:42:47 Top
Ira Whitman




Posts: 56
Joined: 2010-01-21
Please note: after unregistering and reregistering the addin, the registry settings for Outlook matched that of the other applications: ADXStartMode = FirstStart, and LoadBehavior = 3.
Posted 26 Mar, 2014 09:50:41 Top
Ira Whitman




Posts: 56
Joined: 2010-01-21
I found this article, http://blogs.msdn.com/b/haahmadi/archive/2010/05/26/my-vsto-add-in-does-not-load.aspx, which is valuable primarily in that it includes screenshots from the Options->Add-Ins menu, which I've referenced in prior posts. My add-in is among the "Inactive Application Add-ins" as pictured at the top of item #2 in this blog. It also appears unchecked (with the caption, "Load Behavior: Unloaded") in the COM Add-Ins as pictured at the bottom of item #2. However, no error is displayed. Checking the checkbox here loads my add-in and it works -- but only for the life of the current instance of the Office application.

I also found the following article: http://msdn.microsoft.com/en-us/library/bb386106.aspx, which states that the Manifest entry is required. I don't have one.

Should "Manifest" have been set by adxregistrator?
Posted 26 Mar, 2014 10:07:29 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Ira,

Thank you for the explanations and pointers. They help.

Ira Whitman writes:
Checking the checkbox here loads my add-in and it works -- but only for the life of the current instance of the Office application.


Please try setting LoadBehavior=3 using regedit, see HKCU\Software\Microsoft\Office\{host}\AddIns\{your add-in ProgID}.

Ira Whitman writes:
Should "Manifest" have been set by adxregistrator?


This manifest is required for VSTO-based add-ins only.


Andrei Smolin
Add-in Express Team Leader
Posted 26 Mar, 2014 10:19:11 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Do you have a single add-in module supporting all these host applications? Or you use several add-in modules in the same assembly? Or you have several assemblies, each representing an add-in supporting a given host?

Do you have LoadBehavior mentioned in the adxloader.dll.manifest file(s)?


Andrei Smolin
Add-in Express Team Leader
Posted 26 Mar, 2014 10:26:04 Top