[MSI] Add Close app¶
If your MSI package installs an Add-on, Plug-in, or may update shared files used by other processes, it would be a great idea to check if these processes are running and, if so, close them. In addition, to ensure clear package removal, the applications from this package must be closed.
Add the ‘Close app’ entry to detect and close the application in a proper manner (send Close and End Session messages) or forcedly terminate it.
Warning
If ALL the listed below conditions are true, the built-in “File in Use” dialog of the Restart Manager will appear before the Close app runs. In this particular case you need to click ‘Ignore’ to continue the package uninstall and proceed to Close app.
Conditions:
Restart Manager is enabled on your system;
MSI uninstall is run in the UI (non-silent) mode;
Running app was installed by this package.
Important
Precondition: Open an MSI package in MSI Editor (see Open MSI/MST).
- Go to the Package Designer > Close applications tab.
- Click Add in the toolbox.
- Enter the Executable name and set the required options to close the application in the necessary manner. For information, see the description of close app options below.
Description of Close app options:
Option |
Description |
---|---|
|
Name of the executable to be closed. This should only be the file name. |
|
Optionally orders the applications to be closed. |
|
Condition that determines if the application should be closed. Must be blank or evaluate to true for the application to be scheduled for closing. |
|
Property to be set if application is still running. Useful for launch conditions or to conditionalize custom UI to ask user to shut down apps. |
|
Prompt the user with the message if the application is running. The prompt occurs before executing any of the other options and gives the options to “Abort”, “Retry”, or “Ignore”. Abort will cancel the install. Retry will attempt the check again and if the application is still running, prompt again. “Ignore” will continue and execute other options, selected to close the application. |
|
Sends a close message to the application. |
|
Sends WM_QUERYENDSESSION then WM_ENDSESSION messages to the application. |
|
Time in seconds to wait for the application to exit
after the Close and/or End Session messages. If the
application is still running after the timeout then
the |
|
Attempts to terminate the process and returns the specified exit code if the application is still running. |
|
Prompts for reboot if application is still running. |
Note
PACE Suite covers the whole range of application packaging tasks - learn more.
Try PACE Suite for free - 21 days no obligations unlimited trial with all functions unlocked.