VSTO - prompt to close Excel - Advanced Installer Community
LaughingJohn
Posts: 39
Joined: Wed Aug 11, 2010 1:05 pm

VSTO - prompt to close Excel

Hi,

I have a VSTO installer (Office 2010, Excel) which is working fine, but at the moment I seem to be able to run it regardless of whether Excel is open or not. This means that when you uninstall with Excel open the add-in breaks. Is there a way of getting the installer to prompt to close Excel before installing/uninstalling.

Interestingly I have another add-in who's setup package is also built using advanced installer and it does exactly that! The difference is this case is that it uses add-in express and so the setup package runs the add-in express supplied custom actions. I can't figure out if it's add-in express, advanced installer or windows installer that is prompting me to close Outlook (it's an Outlook add-in in this case).

Thanks,
LJ
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: VSTO - prompt to close Excel

Hi LJ,
I have a VSTO installer (Office 2010, Excel) which is working fine, but at the moment I seem to be able to run it regardless of whether Excel is open or not. This means that when you uninstall with Excel open the add-in breaks. Is there a way of getting the installer to prompt to close Excel before installing/uninstalling.
In order to achieve that you can use the predefined detect process custom action to detect if Excel process is running on the target machine. If the process is running, then you can prompt the user using the predefined Display message box custom action. Based on the user answer, you can abort the uninstall process or you can close the running process using the predefined terminate process custom action.

Please takea look on the How do I detect or stop a process? article with related information for hints and guidance. Also, you can take a look on our Checking for the running process and terminating the same forum thread which debates a similar subject.

Let me know if you have other questions.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”