slimCODE
Posts: 2
Joined: Tue Aug 15, 2006 1:46 am
Contact: Website

Stopping a running application before uninstall/update

What is the recommended way to detect if an application about to be uninstalled or reinstalled is already running? Then, what is the prefered way to stop it?

Thank you.
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

Currently Advanced Installer does not support this but we already have this on our TODO list. Until then you can create a custom action dll or exe and schedule it as "New Attached Custom Action" under the "InstallUISequence->Begin".

Regards,
Gigi
__________________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
Last edited by gigi on Tue Aug 15, 2006 9:08 am, edited 2 times in total.
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

Here is some info on how to create your custom action: Create a Visual C++ project (dll or exe). You can use FindWindow (read about this function in MSDN) function to detect (by giving hes name) the window handle of your application. Now that you have the window handle you need to post a WM_CLOSE message to this window using PostMessage function.

Hope this helps.

Regards,
Gigi
__________________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”