Close application before installation - Advanced Installer Community
ml123
Posts: 21
Joined: Mon Jun 09, 2014 9:35 pm

Close application before installation

Hi,

I'm trying to figure out how to make sure an application is closed before beginning the installation.
I need to make sure MS Word is closed before installing a Word Add-In.
I found some materials about a predefined custom action for Close Application, but I can't seem to find this action.
Could you please provide a step-by-step instructions on how to implement this? Please keep in mind I have the Professional version, if that matters.

Thanks!
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Close application before installation

Hi,

In order to close an application before the installation, you can follow the steps below:
- go in the Custom Actions page
- add the "Terminate process custom action after the "Install Execution Stage -> Searches" action group
- in the "Process name" field write the name of the application that you want to close, as it is displayed in Task Manager (i.e. WORD.EXE)
- build and run the project

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ml123
Posts: 21
Joined: Mon Jun 09, 2014 9:35 pm

Re: Close application before installation

Mmm... for some reason that didn't work...
I've added the custom action per your instructions, but it looks like that didn't have any effect. Word still stays open during installation.
Attached is a screenshot of the custom action, did I miss something?

In addition - just to make sure, will that custom action simply close the app, or will it display a message such as "Please close Word before continuing" and enable the user to save and close his documents? I wouldn't want to simply close the app without letting the user to save his work.

Thanks.
Attachments
custom.png
custom.png (115.22 KiB) Viewed 7104 times
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Close application before installation

Hi,

The configuration displayed in your screenshot are correct, however I tested the scenario on two different machines and the Word application was successfully closed. Can you reproduce the problem on multiple machines?
In addition - just to make sure, will that custom action simply close the app, or will it display a message such as "Please close Word before continuing" and enable the user to save and close his documents? I wouldn't want to simply close the app without letting the user to save his work.
This custom action will simply close the application without displaying a message to the user. However, you can achieve what you want if you also use the "Detect process" custom action as described in the Custom Launch Condition Help thread.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”