Issues with installing AddIn per-machine

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

Issues with installing AddIn per-machine
Per machine addin only appears if Word is run as Administrator 
Premkumar Elangovan




Posts: 14
Joined: 2018-12-28
Hello,
I am trying to create an installer so that IT admistrator in an institution can install to all the users using the computer. I followed the steps in the manual and forums and managed to get it installed by running the setup file as Adminstrator. The problem I have is the AddIn Ribbon controls only appear if Word is run as Adminstrator. Please see the project settings, adxloader and adxregistrator files. Your help is much appreciated.

- add-in module, RegisterForAllUsers=true
- adxloader.dll.manifest, privileges="administrator"
- setup project, PostBuildEvent = ... /UAC = On
- setup project, Files System, Application Folder, DefaultLocation = [ProgramFilesFolder]...
- setup project, InstallAllUsers=True



Add-in Express Registrator Log File: 11/03/2020 09:03:44

Installation directory: C:\Program Files (x86)\Astute Digital Solutions Ltd\REF-N-WRITE\
Registrator version: 9.4.4644.0
Operating System: Microsoft Windows 10 (build 18363), 64-bit
Process Owner: Administrator
Command Line: "C:\Program Files (x86)\Astute Digital Solutions Ltd\REF-N-WRITE\adxregistrator.exe" /install="REF_N_WRITE_AddIn.dll" /privileges=admin
Run 'As Administrator': Yes
Process Elevated: Yes
Integrity Level: High
UAC (User Account Control): On
--------------------------------------------------------------
09:03:44 0544 Starting the add-in registration process.
09:03:44 0544 Loading mscoree.dll
09:03:44 0544 Success.
09:03:44 0544 .NET Framework installation directory:
09:03:44 0544 The latest version of .NET Framework: 'v4.0.30319'
09:03:44 0544 Loading CLR: v4.0.30319.
09:03:44 0544 Calling CLRCreateInstance method.
09:03:44 0544 Success.
09:03:44 0544 Calling GetRuntime method.
09:03:44 0544 Success.
09:03:44 0544 Checking if the hosting API of .NET Framework v4.0 beta is installed.
09:03:44 0544 The hosting API is up to date.
09:03:44 0544 Calling GetInterface method for the CorRuntimeHost interface.
09:03:44 0544 Success.
09:03:44 0544 Starting CLR...
09:03:44 0544 Success.
09:03:44 0544 Getting the CLR version.
09:03:44 0544 The CLR v4.0.30319 has been initialized successfully.
09:03:44 0544 Creating a new domain setup.
09:03:44 0544 Success.
09:03:44 0544 Getting the add-in directory.
09:03:44 0544 Success. The directory is 'C:\Program Files (x86)\Astute Digital Solutions Ltd\REF-N-WRITE\'
09:03:44 0544 The 'shadow copy' is disabled.
09:03:44 0544 Creating a new application domain.
09:03:44 0544 Success.
09:03:44 0544 Getting the base directory for the domain.
09:03:44 0544 Success. The directory is 'C:\Program Files (x86)\Astute Digital Solutions Ltd\REF-N-WRITE\'.
09:03:44 0544 Searching for the Add-in Express core library.
09:03:44 0544 Success. The 'AddinExpress.MSO.2005.dll' file is found.
09:03:44 0544 Creating an instance of the 'AddinExpress.Deployment.ADXRegistrator' class.
09:03:44 0544 Assembly identity is 'AddinExpress.MSO.2005'.
09:03:44 0544 Success.
09:03:44 0544 Unwrapping the instance of the 'AddinExpress.Deployment.ADXRegistrator' class.
09:03:44 0544 Success.
09:03:44 0544 Calling the managed registration procedure (DISPID = 1610743823).
09:03:44 1104 32 bits. The 'HKLM\Software\Microsoft\Office\Word\AddIns\REF_N_WRITE_AddIn.AddinModule' registry key was created successfully for the 'REF_N_WRITE_AddIn.AddinModule' class: LoadBehavior=3
09:03:44 1104 32 bits. The 'HKCR\CLSID\{4ae728c4-795d-4261-b978-a65bbc02f211}\InprocServer32' registry key was created successfully for the 'REF_N_WRITE_AddIn.AddinModule' class: C:\Program Files (x86)\Astute Digital Solutions Ltd\REF-N-WRITE\adxloader.dll
09:03:44 1104 64 bits. The 'HKLM\Software\Microsoft\Office\Word\AddIns\REF_N_WRITE_AddIn.AddinModule' registry key was created successfully for the 'REF_N_WRITE_AddIn.AddinModule' class: LoadBehavior=3
09:03:44 1104 64 bits. The 'HKCR\CLSID\{4ae728c4-795d-4261-b978-a65bbc02f211}\InprocServer32' registry key was created successfully for the 'REF_N_WRITE_AddIn.AddinModule' class: C:\Program Files (x86)\Astute Digital Solutions Ltd\REF-N-WRITE\adxloader64.dll
09:03:45 0544 Registration success.
09:03:45 0544 The add-in registration process is completed with HRESULT = 0.

Add-in Express Loader Log File: 11/03/2020 09:07:49:557

Startup directory: C:\Program Files (x86)\Astute Digital Solutions Ltd\REF-N-WRITE\
Loader version: 9.4.4644.0
Operating System: Microsoft Windows 10 (build 18363), 64-bit
Process Owner: Administrator
Command Line: "C:\Program Files\WindowsApps\Microsoft.Office.Desktop.Word_16051.13318.20000.0_x86__8wekyb3d8bbwe\Office16\WINWORD.exe"
Run 'As Administrator': Yes
Process Elevated: Yes
Integrity Level: High
UAC (User Account Control): On
------------------------------------------------------------------------
09:07:49:559 2240 7440 Start.
09:07:49:559 2240 7440 The minimum supported Office version is 12
09:07:49:559 2240 7440 The host's version is 16.0.13318.20000
09:07:49:560 2240 7440 Creating a new instance of the add-in loader.
09:07:49:560 2240 7440 Loading mscoree.dll
09:07:49:561 2240 7440 INFO: Assembly codebase - C:\Program Files (x86)\Astute Digital Solutions Ltd\REF-N-WRITE\REF_N_WRITE_AddIn.dll.
09:07:49:561 2240 7440 INFO: Assembly version - 4.5.0.0.
09:07:49:562 2240 7440 Success.
09:07:49:562 2240 7440 Loading the configuration from the system registry.
09:07:49:562 2240 7440 Getting the latest CLR version.
09:07:49:564 2240 7440 The latest CLR version is 'v4.0.30319'.
09:07:49:564 2240 7440 The configuration has been loaded successfully.
09:07:49:564 2240 7440 Runtime version: v4.0.30319.
09:07:49:564 2240 7440 Assembly name: REF_N_WRITE_AddIn.
09:07:49:564 2240 7440 Class name: REF_N_WRITE_AddIn.AddinModule.
09:07:49:564 2240 7440 Registry key: CLSID\{4AE728C4-795D-4261-B978-A65BBC02F211}.
09:07:49:564 2240 7440 Attempting to create a new instance of the managed add-in class: CLR - v4.0.30319
09:07:49:564 2240 7440 Loading CLR: v4.0.30319.
09:07:49:564 2240 7440 Calling CLRCreateInstance method.
09:07:49:564 2240 7440 Success.
09:07:49:564 2240 7440 Calling GetRuntime method.
09:07:49:564 2240 7440 Success.
09:07:49:564 2240 7440 Checking if the hosting API of .NET Framework v4.0 beta is installed.
09:07:49:579 2240 7440 The hosting API is up to date.
09:07:49:579 2240 7440 Calling SetDefaultStartupFlags method.
09:07:49:579 2240 7440 Success.
09:07:49:579 2240 7440 Calling GetInterface method for the CorRuntimeHost interface.
09:07:49:579 2240 7440 Success.
09:07:49:579 2240 7440 Starting CLR...
09:07:49:579 2240 7440 Success.
09:07:49:579 2240 7440 Getting the CLR version.
09:07:49:579 2240 7440 The CLR v4.0.30319 has been initialized successfully.
09:07:49:579 2240 7440 Creating a new domain setup.
09:07:49:582 2240 7440 Success.
09:07:49:582 2240 7440 Getting the add-in directory.
09:07:49:582 2240 7440 Success. The directory is 'C:\Program Files (x86)\Astute Digital Solutions Ltd\REF-N-WRITE\'
09:07:49:583 2240 7440 The 'shadow copy' is disabled.
09:07:49:583 2240 7440 Creating a new application domain.
09:07:49:586 2240 7440 Success.
09:07:49:586 2240 7440 Creating an instance of the managed class. Assembly identity: 'REF_N_WRITE_AddIn'
09:07:50:085 2240 7440 Success.
09:07:50:085 2240 7440 Unwrapping the managed class.
09:07:50:107 2240 7440 Success.
09:07:50:107 2240 7440 Querying the add-in extensibility.
09:07:50:107 2240 7440 Success.
09:07:50:107 2240 7440 Querying the custom task panes.
09:07:50:107 2240 7440 Success.
09:07:50:107 2240 7440 Querying the ribbon extensibility.
09:07:50:107 2240 7440 Success.
09:07:50:107 2240 7440 Querying the form regions.
09:07:50:107 2240 7440 Success.
09:07:50:107 2240 7440 Querying the encryption provider.
09:07:50:107 2240 7440 The 'EncryptionProvider' interface is not supported.
09:07:50:107 2240 7440 Getting the dispid of the 'Dispose' method.
09:07:50:107 2240 7440 Success.
09:07:50:107 2240 7440 Getting the dispid of the 'InitializeLoaderService' method.
09:07:50:107 2240 7440 Success.
09:07:50:107 2240 7440 Invoking the 'InitializeLoaderService' method.
09:07:50:107 2240 7440 Success.
09:07:50:107 2240 7440 The instance of the managed add-in class has been created successfully.
Posted 03 Nov, 2020 06:25:13 Top
Andrei Smolin


Add-in Express team


Posts: 18793
Joined: 2006-05-11
Hello Premkumar,

Premkumar Elangovan writes:
Command Line: "C:\Program Files\WindowsApps\Microsoft.Office.Desktop.Word_16051.13318.20000.0_x86__8wekyb3d8bbwe\Office16\WINWORD.exe"


I assume this means you use the Office from Microsoft Store version; see also https://www.add-in-express.com/creating-addins-blog/2019/02/27/office-from-store-issues/. Still that post describes issues with per-user add-ins while your is per-machine. I wonder however if you ever tried to install a per-user edition of your project on that machine. If so, I believe, the copy of the registry keys that this Office installation stores contain registry information pointing to the per-user edition of your add-in and this *somehow* prevents your add-in from loading.

I understand about Ribbons not shown. My question is: is your add-in loaded at all? What occurs if Word is started non-elevated? Do you have an adxloader.log created in this case?


Andrei Smolin
Add-in Express Team Leader
Posted 04 Nov, 2020 01:40:21 Top
Premkumar Elangovan




Posts: 14
Joined: 2018-12-28
Hi Andrei,
Thanks for your help. It was the registry keys. I used the same machine to test the per-user addin and per-machine addin, that is where the problem was. Once I cleared the entry in the HLKU, the addin loaded okay for the users.

Regards,
Prem
Posted 04 Nov, 2020 09:39:30 Top
Andrei Smolin


Add-in Express team


Posts: 18793
Joined: 2006-05-11
Welcome!


Andrei Smolin
Add-in Express Team Leader
Posted 04 Nov, 2020 09:48:33 Top