Updater program left running after uninstall

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

Updater program left running after uninstall
Updater 
Subscribe
Ionut Adrian




Posts: 18
Joined: 2021-06-21
Hi there,

My setup:
- PowerPoint add-in
- Visual Studio setup project msi installer (all users)
- automatic silent updates

Issue:
On computers with Windows 10 version 1709, after uninstalling the add-in, the Add-in express updater process remains running (I see it in task manager) and the corresponding add-in folder in Program Data directory (that holds the updater and the service files) remains on the disk (together with the updater and service executable and config files). The service process is uninstalled correctly and is no longer running.
On other computers (with Windows version 21H1) both Add-in Express updater and service are uninstalled correctly and the add-in folder in Program Data gets deleted.
Any idea why the updater process isn't killed and the add-in folder isn't deleted after uninstall? Any suggestion how to force a kill and a delete on uninstall?

Adrian

P.S. The same issue happens on Windows 10 version 1709 with a basic Excel add-in, per user. The updater app remain running after uninstall and the corresponding add-in folder (now it is in C:\Users\user_name\AppData\Local directory) remains untouched. I used the same Excel sample add-in built for me by one of your colleagues, following another thread.
I can send a video showing what's happening, if needed.

P.P.S. Here is the adxregistrator.log for the basic Excel add-in, it shows a "Destination array is not long enough to copy all the items in the collection." when trying to close the updater. Same error for my PowerPoint add-in. The add-in data folder is not deleted after restart.

Add-in Express Registrator Log File: 08/17/2021 23:00:24

Installation directory: C:WindowsInstaller
Registrator version: 9.5.4661.0
Operating System: Microsoft Windows 10 (build 16299), 64-bit
Process Owner: Administrator
Command Line: "C:WindowsInstallerMSI777D.tmp" /uninstall="C:UsersxxxAppDataLocalDefault CompanyMyAddin33MyAddin33.dll" /privileges=user
Run 'As Administrator': No
Process Elevated: No
Integrity Level: Medium
UAC (User Account Control): On
--------------------------------------------------------------
23:00:24 0512 Starting the add-in unregistration process.
23:00:24 0512 Loading mscoree.dll
23:00:24 0512 Success.
23:00:24 0512 .NET Framework installation directory: 
23:00:24 0512 The latest version of .NET Framework: 'v4.0.30319'
23:00:24 0512 Loading CLR: v4.0.30319.
23:00:24 0512 Calling CLRCreateInstance method.
23:00:24 0512 Success.
23:00:24 0512 Calling GetRuntime method.
23:00:24 0512 Success.
23:00:24 0512 Checking if the hosting API of .NET Framework v4.0 beta is installed.
23:00:24 0512 The hosting API is up to date.
23:00:24 0512 Calling GetInterface method for the CorRuntimeHost interface.
23:00:24 0512 Success.
23:00:24 0512 Starting CLR...
23:00:24 0512 Success.
23:00:24 0512 Getting the CLR version.
23:00:24 0512 The CLR v4.0.30319 has been initialized successfully.
23:00:24 0512 Creating a new domain setup.
23:00:24 0512 Success.
23:00:24 0512 The 'shadow copy' is disabled.
23:00:24 0512 Creating a new application domain.
23:00:24 0512 Success.
23:00:24 0512 Getting the base directory for the domain.
23:00:24 0512 Success. The directory is 'C:UsersxxxAppDataLocalDefault CompanyMyAddin33'.
23:00:24 0512 Searching for the Add-in Express core library.
23:00:24 0512 Success. The 'AddinExpress.MSO.2005.dll' file is found.
23:00:24 0512 Creating an instance of the 'AddinExpress.Deployment.ADXRegistrator' class.
23:00:24 0512 Assembly identity is 'AddinExpress.MSO.2005'.
23:00:24 0512 Success.
23:00:24 0512 Unwrapping the instance of the 'AddinExpress.Deployment.ADXRegistrator' class.
23:00:24 0512 Success.
23:00:24 0512 Calling the managed unregistration procedure (DISPID = 1610743823).
23:00:24 1036 The 'automatic updates' feature is enabled. Getting the deployment properties...
23:00:24 1036 Success.
23:00:24 1036 The updater application is registered for startup. Removing the registration...
23:00:24 1036 Success.
23:00:24 1036 The updater application is running.
23:00:24 1036 Connecting to the updater application...
23:00:24 1036 Success.
23:00:24 1036 Checking if we can close it...
23:00:24 1036 Failed. Destination array is not long enough to copy all the items in the collection. Check array index and length.
23:00:24 1036 The updater directory: C:UsersxxxAppDataLocalmyaddin33DCFBA0F59D4440B5CED47188808CFC.0.1
23:00:24 1036 Removing the updater directory...
23:00:24 1036 The file 'C:UsersxxxAppDataLocalmyaddin33DCFBA0F59D4440B5CED47188808CFC.0.1myaddin33.updater.exe' is locked. The updater directory will be removed later.
23:00:24 0512 Unregistration success.
23:00:24 0512 The add-in unregistration process is completed with HRESULT = 0.
Posted 16 Aug, 2021 09:52:47 Top
Sergey Grischenko


Add-in Express team


Posts: 7234
Joined: 2004-07-05
Hi Adrian,

I will try to reproduce the issue and will let you know about results soon.
Posted 18 Aug, 2021 05:27:37 Top
Sergey Grischenko


Add-in Express team


Posts: 7234
Joined: 2004-07-05
Hi Adrian,

I can't reproduce the issue. Do you have any errors in the updater log?
Posted 18 Aug, 2021 09:21:09 Top
Ionut Adrian




Posts: 18
Joined: 2021-06-21
Hi Sergey,

Everything looks good in the updater log, see this video.
Posted 18 Aug, 2021 09:44:37 Top
Sergey Grischenko


Add-in Express team


Posts: 7234
Joined: 2004-07-05
Hi Adrian,

It seems that the updater application hangs. Do you have any antivirus software running on the PC?
Posted 19 Aug, 2021 08:04:52 Top
Ionut Adrian




Posts: 18
Joined: 2021-06-21
Hi Sergey,

No, it's a clean installation of Windows build 1709. And the same error happens on two different machines with this Windows version, so I think the best to replicate it is to test on this Windows version.
Posted 19 Aug, 2021 08:14:45 Top
Ionut Adrian




Posts: 18
Joined: 2021-06-21
I don't know if it helps, but I managed to kill the updater process and then delete the add-in folder in program data through a custom action dll added to the MSI Uninstall section (after adxregistrator entry). So the updater is not blocked (at least not after the whole uninstall process finished). But this is not exactly the correct way to do it...
Posted 19 Aug, 2021 09:55:29 Top
Sergey Grischenko


Add-in Express team


Posts: 7234
Joined: 2004-07-05
Hi Adrian,

I don't have any PCs with old builds of Windows 10. I will try to setup a VPC with 1709 and will let you know about results.
Posted 19 Aug, 2021 14:36:10 Top
Ionut Adrian




Posts: 18
Joined: 2021-06-21
Great, thank you!
Posted 20 Aug, 2021 03:20:52 Top
Sergey Grischenko


Add-in Express team


Posts: 7234
Joined: 2004-07-05
Hi Adrian,

I reproduced the issue in Windows 10 (1709). I will review the source code of the updater and will let you know about results soon.
Posted 25 Aug, 2021 17:46:59 Top