Uninstall Add-in files...

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

Uninstall Add-in files...
 
Heinz-Josef Bomanns




Posts: 206
Joined: 2008-02-28
Hi,

due to reasons i can't change i have to install add ins with another installer system than the VS setup projects. I install all DLLs and Assemblies needed to lets say \Program Files\MyCompany\MyAddIn. The add ins are working fine, no problems at all. But when uninstalling the add in (after Word, Excel, Outlook etc. is shutdown) i get several errors that for e.g. adxloader.dll, extensibility.dll, Interop.Word.dll or my add in "MyAddIn.dll" is still in use and can't be deleted. Wondering WHAT may use this files if the host application has quitted? The process for e.g. EXCEL.EXE or WINWORD.EXE is defintily gone, checked this with Task Manager, Virusscanner or other similar tools that might block files are not running. Thanks a bunch for any hint on this problem...
__________________
Greetings, HJB
Posted 27 Jan, 2010 00:45:51 Top
Andrei Smolin


Add-in Express team


Posts: 16992
Joined: 2006-05-11
Hi Heinz-Josef,

Still you need to check if any of the hosts supported by your add-in is running in this moment.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 27 Jan, 2010 11:26:43 Top
Heinz-Josef Bomanns




Posts: 206
Joined: 2008-02-28
Hi Andrei,

Andrei Smolin writes:
Still you need to check if any of the hosts supported by your add-in is running in this moment.


My uninstall program has a function in the start part to check for running processes of Word, Excel, Outlook etc., it won't continoue until all processes are shutdown. But before starting the uninstall i have checked in addition via Task Manager for running processes of Word, Excel, Outlook etc. and there are non. I've also used Unlocker to check for processes blocking the files, but it has found nothing. But when the uninstall tries to undelete the files it throws an error message telling that the files are in use and can't be dleeted. I wonder if this may have something to do with AppDomain stuff?
__________________
Greetings, HJB
Posted 27 Jan, 2010 12:46:42 Top
Andrei Smolin


Add-in Express team


Posts: 16992
Joined: 2006-05-11
Hi Heinz-Josef,

Is there anything suspicious in the log file typically located in [My ]Documents\Add-in Express\adxloader.log?

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 28 Jan, 2010 11:38:22 Top
skuske




Posts: 53
Joined: 2009-12-30
Heinz-Josef,

I am encountering exactly the same problem, but with an Outlook add-in. Since you did not reply to Andrei's last post I was wondering whether you could post here how you fixed the issue, or whether you found out what exactly caused it.

The problem occurs on my machines even if the add-on has only been installed and not been loaded at all. That means that uninstallation fails right after installing the add-on. The uninstaller says that several files are 'in use', although Outlook and the add-on have not been loaded at all.

Thanks for any help.

Steve
Posted 08 Feb, 2010 01:58:48 Top
Heinz-Josef Bomanns




Posts: 206
Joined: 2008-02-28
Hi Andrei,

Heinz-Josef Bomanns writes:
Is there anything suspicious in the log file typically located in [My ]Documents\Add-in Express\adxloader.log?


No, there are no hints on errors or unusual behaviours, most are 'Success' messages, all LOGs are ending with 'The managed add-in class has been created successfully' and the add in runs fine in the appropriated host app. The problem is exactly like skuske describes: If i try an Uninstall directly after an Install the files are already in use. I should mention that adxloader.dll does a self register (of course), maybe this locks the files in question?

@skuse: For now i solved the problem by checking the files in my Uninstall and, if they are in use, i schedule them for deleteing on next reboot...
__________________
Greetings, HJB
Posted 08 Feb, 2010 04:34:47 Top
Andrei Smolin


Add-in Express team


Posts: 16992
Joined: 2006-05-11
Hi Steve,

I suggest that you install the add-in and look at the log before you start Outlook. If an exception occurs during the installation, look at the log while the exception message is still displayed.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 08 Feb, 2010 04:36:04 Top
skuske




Posts: 53
Joined: 2009-12-30
@Heinz-Josef,

I am doing it exactly as you do: am scheduling to delete the files on next reboot. I am wondering whether you are using Setup Factory for the installation, since I found a post regarding this in the IndigoRose forum... :)

The funny thing is that the files are even in use although the add-in has never been started before. They are 'in use' as soon as the installer has installed them. The adxloader.dll has been registered using regsvr32 through the setup, though, but that should not keep the files in memory after regsvr32 has completed...

I'll try to do some more research today and post here what I'll find out. I am pretty sure that the 'in use problem' is somehow related to regsvr32 keeping the files in memory...
Posted 08 Feb, 2010 05:06:03 Top
skuske




Posts: 53
Joined: 2009-12-30
@Heinz-Josef,

if you are indeed also using Setup Factory, then this might be interesting:

the issue is definitely related to Setup Factory's .dll registration and unregistration actions. I have found something very strange to happen when you unregister adxloader.dll manually through the Setup Factory uninstaller, in Setup Factory's 'Pre-Uninstall' action, through the Setup Factory 'System.UnregisterActiveX' command: when you try to unregister adxloader.dll through System.UnregisterActiveX, then your add-in is actually starting up (!!!) - I found that to be the case since my add-on displays a form if it is started. So, unregistering it through Setup Factory does not unregister it, but starting your add-on, even without the host application!!! My add-on is an Outlook add-on, and Outlook is not in the list of active processes when this happens. Only the add-on is started, nothing else, just like it is started along with Outlook.

This brings me to this question: is there any way to register and unregister the add-on with any other tool, except regsvr32? I would like to test this to make sure it's either regsvr32 itself causing this, or Setup Factory (in case it uses another method than calling regsvr32)...
Posted 08 Feb, 2010 06:12:28 Top
Andrei Smolin


Add-in Express team


Posts: 16992
Joined: 2006-05-11
Hi Steve,

regsvr32 will cause the same behaior because Add-in Express creates an instance of your add-in module in order to get permanent command bar names and other things to be cleaned in the host appplication when you uninstall the add-in. That's why we always suggest moving all initialization-related things to AddinInitialize.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 08 Feb, 2010 06:27:15 Top