Wix installer not working

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

Wix installer not working
 
John Zabroski




Posts: 12
Joined: 2019-08-29
Hi,

I am using Visual Studio 2019 and trying to figure out why the Wix Installer isn't working on a remote machine. The VDProj works correctly but Visual Studio 2019 has issues loading VSProj even with the VDProj extension.

The key thing seems to be there is no UAC prompt when starting the Installer on the remote machine. As a result, I get the following error log -- note that it is not running as administrator. If relevant, I am a local administrator on the box - not sure if that could be why it isn't reproduced. Other relevant info: I'm using Wix 3.11.1 Build Tools.




Add-in Express Registrator Log File: 09/12/2019 13:13:23

Installation directory: C:\WINDOWS\Installer\
Registrator version: 9.4.4644.0
Operating System: Microsoft Windows 10 Professional (build 17134), 64-bit
Process Owner: Administrator
Command Line: "C:\WINDOWS\Installer\MSIFBA5.tmp" /install="C:\Program Files (x86)\Default Company Name\SubscriberRTDAddin\SubscriberRTDAddin.dll" /privileges=admin
Run 'As Administrator': No
Process Elevated: No
Integrity Level: Medium
UAC (User Account Control): On
--------------------------------------------------------------
13:13:23 0512 Starting the add-in registration process.
13:13:23 0512 Loading mscoree.dll
13:13:23 0512 Success.
13:13:23 0512 .NET Framework installation directory:
13:13:23 0512 The latest version of .NET Framework: 'v4.0.30319'
13:13:23 0512 Loading CLR: v4.0.30319.
13:13:23 0512 Calling CLRCreateInstance method.
13:13:23 0512 Success.
13:13:23 0512 Calling GetRuntime method.
13:13:23 0512 Success.
13:13:23 0512 Checking if the hosting API of .NET Framework v4.0 beta is installed.
13:13:23 0512 The hosting API is up to date.
13:13:23 0512 Calling GetInterface method for the CorRuntimeHost interface.
13:13:23 0512 Success.
13:13:23 0512 Starting CLR...
13:13:23 0512 Success.
13:13:23 0512 Getting the CLR version.
13:13:23 0512 The CLR v4.0.30319 has been initialized successfully.
13:13:23 0512 Creating a new domain setup.
13:13:23 0512 Success.
13:13:23 0512 The 'shadow copy' is disabled.
13:13:23 0512 Creating a new application domain.
13:13:23 0512 Success.
13:13:23 0512 Getting the base directory for the domain.
13:13:23 0512 Success. The directory is 'C:\Program Files (x86)\Default Company Name\SubscriberRTDAddin\'.
13:13:23 0512 Searching for the Add-in Express core library.
13:13:23 0512 Success. The 'AddinExpress.RTD.2005.dll' file is found.
13:13:23 0512 Creating an instance of the 'AddinExpress.Deployment.ADXRegistrator' class.
13:13:23 0512 Assembly identity is 'AddinExpress.RTD.2005'.
13:13:23 0512 Success.
13:13:23 0512 Unwrapping the instance of the 'AddinExpress.Deployment.ADXRegistrator' class.
13:13:23 0512 Success.
13:13:23 0512 Calling the managed registration procedure (DISPID = 1610743823).
13:13:23 0512 Managed Error:
Date and Time: 9/12/2019 1:13:23 PM
Machine Name: WRKETS01
IP Address: fe80::5834:cb45:c245:750b%6
Current User: EXAMPLE\John.Zabroski

Application Domain: C:\Program Files (x86)\Default Company Name\SubscriberRTDAddin\
Assembly Codebase: file:///C:/Program Files (x86)/Default Company Name/SubscriberRTDAddin/AddinExpress.RTD.2005.DLL
Assembly Full Name: AddinExpress.RTD.2005, Version=9.4.4644.0, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version: 9.4.4644.0

Exception Source: AddinExpress.RTD.2005
Exception Type: System.ComponentModel.Win32Exception
Exception Message: Access is denied
Exception Target Site: CreateSubKey

---- Stack Trace ----
AddinExpress.Projects.Common.ADXRegistryKey.CreateSubKey(subKeyName As String)
AddinExpress.RTD.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, customGuid As String)
AddinExpress.RTD.2005.DLL: N 0100 (0x64) IL
AddinExpress.Projects.Common.Utilities.RegisterType(t As Type, createVersionKey As Boolean, allUsers As Boolean, targetHive As ADXTargetRegistryHive, callRegMethod As Boolean, customGuid As String)
AddinExpress.RTD.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.RTD.2005.DLL: N 0039 (0x27) IL
AddinExpress.Deployment.AddinDomainAdapter.RegisterForComInterop(register As Boolean, dllType As String, dllPath As String, showExceptions As Boolean)
AddinExpress.RTD.2005.DLL: N 0205 (0xCD) IL
AddinExpress.Deployment.ADXRegistrator.RegisterAssembly(commandLine As String)
AddinExpress.RTD.2005.DLL: N 0867 (0x363) IL



13:13:23 0512 The add-in registration process is completed with HRESULT = -2147467259.
Posted 12 Sep, 2019 12:18:51 Top
John Zabroski




Posts: 12
Joined: 2019-08-29
I figured it out. Have to use setup.exe - this is NOT intuitive.
Posted 12 Sep, 2019 12:42:50 Top
Dmitry Kostochko


Add-in Express team


Posts: 2841
Joined: 2004-04-05
Hi John,

Everything is correct, a per-machine installation requires elevated privileges.
Posted 13 Sep, 2019 02:57:12 Top
John Zabroski




Posts: 12
Joined: 2019-08-29
Can you elaborate? When I right-click the msi, there is no "Run As Administrator" option. Further, I do not get a UAC prompt, despite in the adxregistrator.log file it saying that it should run as administrator. I do think this is a bug, but for whatever reason, using setup.exe works and the .msi does not.

See my log, again:

Process Owner: Administrator
Command Line: "C:\WINDOWS\Installer\MSIFBA5.tmp" /install="C:\Program Files (x86)\Default Company Name\SubscriberRTDAddin\SubscriberRTDAddin.dll" /privileges=admin

And tell me if your answer is still "Everything is correct"
Posted 13 Sep, 2019 12:05:00 Top
Andrei Smolin


Add-in Express team


Posts: 17184
Joined: 2006-05-11
Hello John,

John Zabroski writes:
When I right-click the msi, there is no "Run As Administrator" option.


That's because a .MSI is a database processed by msiexec.exe: if you start setup.exe elevated, msiexec.exe will run elevated as well.

Also, starting setup.exe lets you control if prerequisites will be checked and installed.

John Zabroski writes:
Process Owner: Administrator


Here's what is written in an adxregistrator.log created when an elevated installer started adxregistrator.exe to register a per-machine add-in:

Process Owner: Administrator
Command Line: "{path}\adxregistrator.exe" /install="{assembly name}.dll" /privileges=admin
Run 'As Administrator': Yes
Process Elevated: Yes

If an administrator user starts the installer non-elevated the log will be as follows:

Process Owner: Administrator
Command Line: "{path}\adxregistrator.exe" /install="{assembly name}.dll" /privileges=admin
Run 'As Administrator': No
Process Elevated: No

Since a non-elevated process cannot write to Program Files and HKLM, your per-machine add-in won't be *registered*.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 16 Sep, 2019 05:39:27 Top