.msi (Per-Machine) installer doesn't work.

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

.msi (Per-Machine) installer doesn't work.
 
Bobby M.




Posts: 21
Joined: 2015-11-09
Hey Add-In Express Team :)

I have a problem with the .msi installation file.
When I create a .msi file for per-user installation it works fine.(RegisterForAllUser=false)
But when I create a .msi file for per-machine installation it doesn't work.(RegisterForAllUser=true) The Add-In is installed in the correct folder, but when I start Outlook I can't find my AddIn.It also does not create a the registries in: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Outlook\Addins\

When I start the .exe(per-machine) installer it works fine .. but why does it not work with the .msi ?

Thank you :)
Posted 13 May, 2019 03:13:24 Top
Andrei Smolin


Add-in Express team


Posts: 18827
Joined: 2006-05-11
Hello Bobby,

The Add-in Express manual (see the PDF file in the folder {Add-in Express}\Docs on your development PC) provides instructions that you need follow. See sections:

- Deploying a per-user Office extension via an MSI installer
- Deploying a per-machine Office extension via an MSI installer


Andrei Smolin
Add-in Express Team Leader
Posted 13 May, 2019 03:46:42 Top
Bobby M.




Posts: 21
Joined: 2015-11-09
Hi Andrei, thanks for the quick reply.

I've already read the pdf and noticed the following lines:
The user must have administrative permissions and run the setup.exe (not .MSI).


So per machine .msi is not possible???

If you run the .MSI, you'll get one of the following results:
?Â?Ð?? for the user with standard user permissions - the prerequisites will not install, your extension won't be registered because administrator privileges are required
?Â?Ð?? for the user with administrative permissions - the extension will be installed but it might not run if any of the prerequisites was not previously installed


What prerequisites do I need. ? I just only use .NET and nothing more.
but the msi still does not work.
Posted 13 May, 2019 04:03:51 Top
Andrei Smolin


Add-in Express team


Posts: 18827
Joined: 2006-05-11
Bobby M. writes:
So per machine .msi is not possible???


What Add-in Express provides is a tried way to development and deployment of Office extensions. Add-in Express cannot support all possible ways. You may prefer to use a different approach. Say, you can create an .MSI and use custom actions to elevate the installer when required and install accordingly. The point is: Add-in Express suggests using a different approach.

Bobby M. writes:
What prerequisites do I need. ? I just only use .NET and nothing more.


Then you need the .NET Framework version that you use to develop your add-in project.

Bobby M. writes:
but the msi still does not work.


Let Add-in Express create a setup project for your per-machine add-in (check the corresponding section in the manual), and run setup.exe, not the .MSI. Does it work?

If it doesn't, please describe what exactly doesn't work. In what way it doesn't work?


Andrei Smolin
Add-in Express Team Leader
Posted 13 May, 2019 07:00:45 Top
Bobby M.




Posts: 21
Joined: 2015-11-09
Thank you Andrei. I'm sorry for my bad english.

Let Add-in Express create a setup project for your per-machine add-in (check the corresponding section in the manual), and run setup.exe, not the .MSI. Does it work?

If it doesn't, please describe what exactly doesn't work. In what way it doesn't work?


I've created a new project which displays a "Hello World" Messagebox when Outlook has started. I did all the steps in the manual to create an installer(per-machine). I've set
all the properties and checked this against the ones in the manual. Everything is done like it is described.
The setup.exe works perfect. When I start Outlook it displays the messagebox. I've noticed the setup.exe created a registry entry in blue
But when I start the .msi file it doesnt display my messagebox when Outlook has started and does not create the entry in the registry. Plus, I can't find it in the AddIns Settings in Outlook.
Posted 13 May, 2019 07:29:04 Top
Andrei Smolin


Add-in Express team


Posts: 18827
Joined: 2006-05-11
Bobby M. writes:
But when I start the .msi file it doesnt display my messagebox when Outlook has started and does not create the entry in the registry. Plus, I can't find it in the AddIns Settings in Outlook.


If that MSI deploys a per-machine add-in, you should start setup.exe. Also, the setup project created following these instructions creates adxregistrator.log in {user profile}\AppData\Local\Temp\<ProductName>\adxregistrator.log; the ProductName part reflects the ProductName field of AssemblyInfo.cs (AssemblyInfo.vb). Please provide that log file.


Andrei Smolin
Add-in Express Team Leader
Posted 13 May, 2019 09:07:54 Top
Bobby M.




Posts: 21
Joined: 2015-11-09
Add-in Express Registrator Log File: 05/13/2019 16:33:57

Installation directory: C:Program Files (x86)Default CompanyPerMachineTEST
Registrator version: 9.2.4635.0
Operating System: Microsoft Windows 10 Professional (build 17763), 64-bit
Process Owner: Administrator
Command Line: "C:Program Files (x86)Default CompanyPerMachineTESTdxregistrator.exe" /install="PerMachineTEST.dll" /privileges=admin
Run 'As Administrator': No
Process Elevated: No
Integrity Level: Medium
UAC (User Account Control): On
--------------------------------------------------------------
16:33:57 0552 Starting the add-in registration process.
16:33:57 0552 Loading mscoree.dll
16:33:57 0552 Success.
16:33:57 0552 .NET Framework installation directory: 
16:33:57 0552 The latest version of .NET Framework: 'v4.0.30319'
16:33:57 0552 Loading CLR: v4.0.30319.
16:33:57 0552 Calling CLRCreateInstance method.
16:33:57 0552 Success.
16:33:57 0552 Calling GetRuntime method.
16:33:57 0552 Success.
16:33:57 0552 Checking if the hosting API of .NET Framework v4.0 beta is installed.
16:33:57 0552 The hosting API is up to date.
16:33:57 0552 Calling GetInterface method for the CorRuntimeHost interface.
16:33:57 0552 Success.
16:33:57 0552 Starting CLR...
16:33:57 0552 Success.
16:33:57 0552 Getting the CLR version.
16:33:57 0552 The CLR v4.0.30319 has been initialized successfully.
16:33:57 0552 Creating a new domain setup.
16:33:57 0552 Success.
16:33:57 0552 Getting the add-in directory.
16:33:57 0552 Success. The directory is 'C:Program Files (x86)Default CompanyPerMachineTEST'
16:33:57 0552 The 'shadow copy' is disabled.
16:33:57 0552 Creating a new application domain.
16:33:57 0552 Success.
16:33:57 0552 Getting the base directory for the domain.
16:33:57 0552 Success. The directory is 'C:Program Files (x86)Default CompanyPerMachineTEST'.
16:33:57 0552 Searching for the Add-in Express core library.
16:33:57 0552 Success. The 'AddinExpress.MSO.2005.dll' file is found.
16:33:57 0552 Creating an instance of the 'AddinExpress.Deployment.ADXRegistrator' class.
16:33:57 0552 Assembly identity is 'AddinExpress.MSO.2005'.
16:33:58 0552 Success.
16:33:58 0552 Unwrapping the instance of the 'AddinExpress.Deployment.ADXRegistrator' class.
16:33:58 0552 Success.
16:33:58 0552 Calling the managed registration procedure (DISPID = 1610743823).
16:33:58 0552 Managed Error: 
Date and Time:         13.05.2019 16:33:58
Machine Name:          LAPTOPTBOBBY
IP Address:            xxxxxxxxxxxxxxxxxxxxx
Current User:          LAPTOPBOBBYBOBBY

Application Domain:    C:Program Files (x86)Default CompanyPerMachineTEST
Assembly Codebase:     file:///C:/WINDOWS/assembly/GAC_MSIL/AddinExpress.MSO.2005/9.2.4635.0__4416dd98f0861965/AddinExpress.MSO.2005.dll
Assembly Full Name:    AddinExpress.MSO.2005, Version=9.2.4635.0, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version:      9.2.4635.0

Exception Source:      AddinExpress.MSO.2005
Exception Type:        System.ComponentModel.Win32Exception
Exception Message:     Zugriff verweigert
Exception Target Site: CreateSubKey

---- Stack Trace ----
   AddinExpress.Projects.Common.ADXRegistryKey.CreateSubKey(subKeyName As String)
       AddinExpress.MSO.2005.dll: N 0133 (0x85) IL 
   AddinExpress.Projects.Common.Utilities.RegisterManagedType(rootKey As ADXRegistryKey, type As Type, strAsmName As String, strAsmVersion As String, strAsmCodeBase As String, strRuntimeVersion As String, targetHive As ADXTargetRegistryHive, createVersionKey As Boolean)
       AddinExpress.MSO.2005.dll: N 0082 (0x52) IL 
   AddinExpress.Projects.Common.Utilities.RegisterType(t As Type, createVersionKey As Boolean, allUsers As Boolean, targetHive As ADXTargetRegistryHive, callRegMethod As Boolean)
       AddinExpress.MSO.2005.dll: N 0179 (0xB3) IL 
   AddinExpress.Projects.Common.Utilities.RegisterAssembly(assembly As Assembly, createVersionKey As Boolean, allUsers As Boolean, targetHive As ADXTargetRegistryHive, callRegMethod As Boolean)
       AddinExpress.MSO.2005.dll: N 0039 (0x27) IL 
   AddinExpress.Deployment.AddinDomainAdapter.RegisterForComInterop(register As Boolean, dllType As String, dllPath As String, showExceptions As Boolean)
       AddinExpress.MSO.2005.dll: N 0205 (0xCD) IL 
   AddinExpress.Deployment.ADXRegistrator.RegisterAssembly(commandLine As String)
       AddinExpress.MSO.2005.dll: N 0696 (0x2B8) IL 



16:33:58 0552 The add-in registration process is completed with HRESULT = -2147467259.
Posted 13 May, 2019 09:56:00 Top
Andrei Smolin


Add-in Express team


Posts: 18827
Joined: 2006-05-11
Thank you, Bobby.

The installer is started non-elevated:

Bobby M. writes:
Command Line: "C:Program Files (x86)Default CompanyPerMachineTESTdxregistrator.exe" /install="PerMachineTEST.dll" /privileges=admin
Run 'As Administrator': No
Process Elevated: No


You install an add-in to Program Files running a non-elevated installer; you can only write to Program Files if you elevate the installer; this occur automatically, if you start setup.exe. Alternatively, you can start an elevated Command Prompt (do this using the "Run as administrator" option) and execute MSIEXEC.EXE registering your MSI with appropriate command switches.

Insufficient permissions show themselves in the exception that occurs when Add-in Express tries to register the add-in:


Bobby M. writes:
Exception Source: AddinExpress.MSO.2005
Exception Type: System.ComponentModel.Win32Exception
Exception Message: Zugriff verweigert
Exception Target Site: CreateSubKey

---- Stack Trace ----
AddinExpress.Projects.Common.ADXRegistryKey.CreateSubKey(subKeyName As String)
AddinExpress.MSO.2005.dll: N 0133 (0x85) IL
AddinExpress.Projects.Common.Utilities.RegisterManagedType(rootKey As ADXRegistryKey, type As Type, strAsmName As String, strAsmVersion As String, strAsmCodeBase As String, strRuntimeVersion As String, targetHive As ADXTargetRegistryHive, createVersionKey As Boolean)
AddinExpress.MSO.2005.dll: N 0082 (0x52) IL
AddinExpress.Projects.Common.Utilities.RegisterType(t As Type, createVersionKey As Boolean, allUsers As Boolean, targetHive As ADXTargetRegistryHive, callRegMethod As Boolean)
AddinExpress.MSO.2005.dll: N 0179 (0xB3) IL
AddinExpress.Projects.Common.Utilities.RegisterAssembly(assembly As Assembly, createVersionKey As Boolean, allUsers As Boolean, targetHive As ADXTargetRegistryHive, callRegMethod As Boolean)
AddinExpress.MSO.2005.dll: N 0039 (0x27) IL
AddinExpress.Deployment.AddinDomainAdapter.RegisterForComInterop(register As Boolean, dllType As String, dllPath As String, showExceptions As Boolean)
AddinExpress.MSO.2005.dll: N 0205 (0xCD) IL
AddinExpress.Deployment.ADXRegistrator.RegisterAssembly(commandLine As String)
AddinExpress.MSO.2005.dll: N 0696 (0x2B8) IL



Andrei Smolin
Add-in Express Team Leader
Posted 13 May, 2019 10:08:37 Top
Bobby M.




Posts: 21
Joined: 2015-11-09
Thank you so much Andrei.
Love the support of you guys.
Posted 13 May, 2019 10:22:35 Top
Andrei Smolin


Add-in Express team


Posts: 18827
Joined: 2006-05-11
Thank you!


Andrei Smolin
Add-in Express Team Leader
Posted 13 May, 2019 10:32:55 Top