Auto-close when one process is a subprocess of another - Advanced Installer Community
toby_miller
Posts: 1
Joined: Mon Jan 22, 2018 6:41 pm

Auto-close when one process is a subprocess of another

We have an application with a cef browser subprocess, and when the installer attempts to close it, the cef browser subprocess is listed before the main application. As the subprocess does not close when sent a wm_close message AI fails to close the application.

This is in a main installer rather than an update, although a previous version is already installed.

As far as I can tell AI must attempt to close processes in order, so when the first fails to close, it doesn't carry on and try to close the next (which would close everything). This is unhelpful behaviour as we can't catch the wm_close message coming through to cef. Is there any way of getting round this? Perhaps AI should attempt to close all processes before deciding that it can't, or pick an order starting at the top of the process tree. What would you recommend?

Many thanks
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Auto-close when one process is a subprocess of another

Hello Toby and welcome to out forums,

The FileInUse dialog is a Windows Installer built-in dialog and its functionality (close process order) cannot be changed.

As a workaround solution you can use our detect and stop process custom action approach.

For instance you can check to see if your app processes are running and if so then you can prompt the user to save its work and then close the processes.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”