Cannot uninstall properly in 64 bit machine

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

Cannot uninstall properly in 64 bit machine
 
developer_cp




Posts: 48
Joined: 2016-10-28
The problem with 64bit just keeps haunting me.

Installation log:

Add-in Express Registrator Log File: 01/11/2017 10:09:43

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


After installing, I immediately uninstall and it won't uninstall properly...

Add-in Express Registrator Log File: 01/11/2017 10:10:30

Installation directory: C:WINDOWSInstaller
Registrator version: 8.4.4395.0
Operating System: Microsoft Windows 10 Professional (build 14393), 64-bit
Process Owner: Administrator
Command Line: "C:WINDOWSInstallerMSIA7C4.tmp" /uninstall="C:Program FilesMyTestBlah.dll" /log=%RoamingAppDataFolder%/MyTest
Run 'As Administrator': No
Process Elevated: No
Integrity Level: Medium
UAC (User Account Control): On
--------------------------------------------------------------
10:10:30 0456 Starting the add-in unregistration process.
10:10:30 0456 Loading mscoree.dll
10:10:30 0456 Success.
10:10:30 0456 .NET Framework installation directory: 
10:10:30 0456 The latest version of .NET Framework: 'v4.0.30319'
10:10:30 0456 Loading CLR: v4.0.30319.
10:10:30 0456 Calling CLRCreateInstance method.
10:10:30 0456 Success.
10:10:30 0456 Calling GetRuntime method.
10:10:30 0456 Success.
10:10:30 0456 Checking if the hosting API of .NET Framework v4.0 beta is installed.
10:10:30 0456 The hosting API is up to date.
10:10:30 0456 Calling GetInterface method for the CorRuntimeHost interface.
10:10:30 0456 Success.
10:10:30 0456 Starting CLR...
10:10:30 0456 Success.
10:10:30 0456 Getting the CLR version.
10:10:30 0456 The CLR v4.0.30319 has been initialized successfully.
10:10:30 0456 Creating a new domain setup.
10:10:30 0456 Success.
10:10:30 0456 The 'shadow copy' is disabled.
10:10:30 0456 Creating a new application domain.
10:10:30 0456 Success.
10:10:30 0456 Getting the base directory for the domain.
10:10:30 0456 Success. The directory is 'C:Program FilesMyTest'.
10:10:30 0456 Searching for the Add-in Express core library.
10:10:30 0456 Success. The 'AddinExpress.MSO.2005.dll' file is found.
10:10:30 0456 Creating an instance of the 'AddinExpress.Deployment.ADXRegistrator' class.
10:10:30 0456 Assembly identity is 'AddinExpress.MSO.2005'.
10:10:30 0456 Success.
10:10:30 0456 Unwrapping the instance of the 'AddinExpress.Deployment.ADXRegistrator' class.
10:10:30 0456 Success.
10:10:30 0456 Calling the managed unregistration procedure (DISPID = 1610743823).
10:10:30 0456 Managed Error: 
(Inner Exception)
Date and Time:         1/11/2017 10:10:30 AM
Machine Name:          YUL1DQAWIN1001
IP Address:            fe80::2c92:544:46da:d398%4
Current User:          YUL1DQAWIN1001User

Application Domain:    C:Program FilesMyTest
Assembly Codebase:     file:///C:/Program Files/MyTest/Blah.DLL
Assembly Full Name:    Blah, Version=3.0.0.18169, Culture=neutral, PublicKeyToken=null
Assembly Version:      3.0.0.18169

Exception Source:      Blah
Exception Type:        System.Runtime.InteropServices.COMException
Exception Message:     Wrong OS or OS version for application (Exception from HRESULT: 0x800401FA (CO_E_WRONGOSFORAPP))
Exception Target Site: CreateInstance

---- Stack Trace ----
   Redemption.IClassFactory.CreateInstance(pUnkOuter As Object, refiid As Guid&, ppunk As Object&)
       Blah.DLL: N 00000 (0x0) JIT 
   Redemption.RedemptionLoader.NewRedemptionObject(guid As Guid)
       RedemptionLoader.cs: line 0235, col 17, IL 0304 (0x130)
   Redemption.RedemptionLoader.new_RDOSession()
       RedemptionLoader.cs: line 0037, col 13, IL 0011 (0xB)
   EVMail.AddinModule.GetNewRDOSession(withLogon As Boolean)
       AddinModule.cs: line 0801, col 13, IL 0041 (0x29)
   EVMail.AddinModule.InitRDOSession(withLogon As Boolean)
       AddinModule.cs: line 0792, col 17, IL 0014 (0xE)
   EVMail.AddinModule.UninstallControls()
       AddinModule.cs: line 0588, col 17, IL 0017 (0x11)
   AddinExpress.MSO.ADXAddinModule.ADXUnregister(t As Type)
       Blah.DLL: N 0563 (0x233) IL 
   EVMail.AddinModule.AddinUnregister(t As Type)
       AddinModule.cs: line 0580, col 13, IL 0001 (0x1)



(Outer Exception)
Date and Time:         1/11/2017 10:10:30 AM
Machine Name:          YUL1DQAWIN1001
IP Address:            fe80::2c92:544:46da:d398%4
Current User:          YUL1DQAWIN1001User

Application Domain:    C:Program FilesMyTest
Assembly Codebase:     file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
Assembly Full Name:    mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Assembly Version:      4.0.0.0

Exception Source:      mscorlib
Exception Type:        System.Reflection.TargetInvocationException
Exception Message:     Exception has been thrown by the target of an invocation.
Exception Target Site: InvokeMethod

---- Stack Trace ----
   System.RuntimeMethodHandle.InvokeMethod(target As Object, arguments As Object[], sig As Signature, constructor As Boolean)
       mscorlib.dll: N 00000 (0x0) JIT 
   System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(obj As Object, parameters As Object[], arguments As Object[])
       mscorlib.dll: N 0022 (0x16) IL 
   System.Reflection.RuntimeMethodInfo.Invoke(obj As Object, invokeAttr As BindingFlags, binder As Binder, parameters As Object[], culture As CultureInfo)
       mscorlib.dll: N 0085 (0x55) IL 
   AddinExpress.Projects.Common.Utilities.CallUserDefinedRegistrationMethod(rootKey As ADXRegistryKey, type As Type, bRegister As Boolean, targetHive As ADXTargetRegistryHive)
       mscorlib.dll: N 0332 (0x14C) IL 
   AddinExpress.Projects.Common.Utilities.UnregisterType(t As Type, allUsers As Boolean, targetHive As ADXTargetRegistryHive, callUnregMethod As Boolean, removeProgID As Boolean)
       mscorlib.dll: N 0183 (0xB7) IL 
   AddinExpress.Projects.Common.Utilities.UnregisterAssembly(assembly As Assembly, allUsers As Boolean, targetHive As ADXTargetRegistryHive, callRegMethod As Boolean, removeProgID As Boolean)
       mscorlib.dll: N 0040 (0x28) IL 
   AddinExpress.Deployment.AddinDomainAdapter.RegisterForComInterop(register As Boolean, dllType As String, dllPath As String, showExceptions As Boolean)
       mscorlib.dll: N 0329 (0x149) IL 
   AddinExpress.Deployment.ADXRegistrator.RegisterAssembly(commandLine As String)
       mscorlib.dll: N 0818 (0x332) IL 



10:10:30 0456 The add-in unregistration process is completed with HRESULT = -2147467259.
Posted 11 Jan, 2017 10:29:17 Top
Andrei Smolin


Add-in Express team


Posts: 14106
Joined: 2006-05-11
Hello Eric,

Note that the uninstaller is run non-elevated. Also, I would recommend that you check your installer against the instruction we provide in section "Deploying a per-machine Office extension via an MSI installer", see the PDF file in the folder {Add-in Express}\Docs on your development PC.

Finally, check whether the issue relates to custom code in the constructor and class-level initializers.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 11 Jan, 2017 11:02:27 Top
developer_cp




Posts: 48
Joined: 2016-10-28
I've already did that.
Compiled with Any CPU for the add-in DLL and I build the installer with x64 or x86 respectively.

The Add-in runs fine in both 32 and 64, it is during uninstall that I face the problem.
Posted 13 Jan, 2017 13:05:26 Top
Andrei Smolin


Add-in Express team


Posts: 14106
Joined: 2006-05-11
Hello Eric,

developer_cp writes:
Compiled with Any CPU for the add-in DLL and I build the installer with x64 or x86 respectively.


The instruction we provide specifies creating a 32bit installer. I suggest that you follow it.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 16 Jan, 2017 06:39:10 Top
developer_cp




Posts: 48
Joined: 2016-10-28
I need a 64bit installer, at least I think i do. During uninstall, inside UninstallControls(), Redemption would load its 32bit dll when I try to call Redemption.new_RDOSession().
Posted 16 Jan, 2017 09:54:42 Top
Andrei Smolin


Add-in Express team


Posts: 14106
Joined: 2006-05-11
Hello Eric,

developer_cp writes:
I need a 64bit installer, at least I think i do. During uninstall, inside UninstallControls(), Redemption would load its 32bit dll when I try to call Redemption.new_RDOSession().


The AddinModule.AddinUnregister event is invoked for the add-in module loaded by the adxregistrator.exe process. Since this process is 32bit, your Any CPU code is 32bit as well. Since there's no 64bit adxregistrator.exe, you need to use this workaround: in the code of the event handler, you determine the bitness of Outlook, and, if it is 64 bit, you start a separate .EXE and wait for it to complete. The .EXE is an Any CPU or x64 program.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 17 Jan, 2017 07:00:18 Top