Ana Orec-Archer
Posts: 7
Joined: Tue Nov 27, 2007 11:20 am

Auto Close Applications

Hi,

I am running Advanced Installer version 7.0.1. In the Auto Close Applications I have specified [APPDIR]USBscope50 Software.exe, but the updater does not close the application when updates are being installed. I use NetBeans to create my jar file, and I did just expect it to close when Updater sends close command.

Updater works fine, it comes up with the dialog asking me to close the application and then retry, or if I click on ignore button, it will update the files on restart.

Auto Close Application is such a nice feature that I would like to implement, your help would be very much appreciated.

Do you maybe know if there is something I need to add to NetBeans? Did you expect NetBeans to just deal with the request?
As this is the only AI version I have tried the updater on, is this feature working on 7.0.1?
Do I need to specify jar file as well in Auto Close Application?
The application title is the same as Installed Detection file name and this works, so I don't think I spelled the file name wrong.

Thank you for your help.

Best Regards,
Ana
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Auto Close Applications

Hi Ana

The auto close application feature finds the main window of the specified application and sends a WM_CLOSE message to it. If the application doesn't treat this message, it will not close. Therefore, you should make sure that your application can receive the WM_CLOSE message and acts accordingly.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Ana Orec-Archer
Posts: 7
Joined: Tue Nov 27, 2007 11:20 am

Re: Auto Close Applications

Hi,

Thank you for your prompt reply.

It turns out I also need to fill in Window title prefix box with the application title. Apologies, my mistake. I just added USBscope50 Software in the Windows title prefix box. Updater can close and restart the application now.

USBscope50 Software can have two titles: USBscope50 Software and USBscope50 Software - DEMO MODE. So I add 2 lines in Auto Close to cover these two options. I don't tick Disable Auto Restart on either of these two lines. After update I find two instances of my application running, both lines are executed.

I don't think this is bug, I was just wondering if you possibly have a suggestion on how to deal with this? Can I use Command Line? And how?


Thanks again for your reply.

Ana
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Auto Close Applications

Hi Ana,
It turns out I also need to fill in Window title prefix box with the application title.
This is an alternative to using the application path. If the application path is used, the Updater tries to find it's main window and close it. If a window title prefix is specified, the Updater send the message to all windows that have a title which starts with the specified prefix.
USBscope50 Software can have two titles: USBscope50 Software and USBscope50 Software - DEMO MODE. So I add 2 lines in Auto Close to cover these two options.
For these two titles you can specify the prefix:

Code: Select all

USBscope50 Software
This should match both titles ("USBscope50 Software" is the prefix of "USBscope50 Software - DEMO MODE").

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Ana Orec-Archer
Posts: 7
Joined: Tue Nov 27, 2007 11:20 am

Re: Auto Close Applications

Hi,

I cannot get updater to close my application with just using the Main executable path. Actually adding Window title prefix is much better solution for me anyway as multiple instances are then closed.

You are right, specifying "[APPDIR]USBscope50 Software.exe" in main executable path and "USBscope50 Software" in Window title prefix will close both USBscope50 Software and USBscope50 Software - DEMO MODE application. One Auto Close Application line is enough. I didn't quite get CODE: SELECT ALL bit, but never mind, updater is working very nicely now.

Thank you. You are brill! :D

Best Regards,
Ana
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Auto Close Applications

Hi Ana,

I'm glad the problem is solved.
I didn't quite get CODE: SELECT ALL bit
"CODE" is a tag which shows that the green text with a white background has coding (programming code) format. I used this tag to make the prefix more visible. The "SELECT ALL" link in the tag allows you to select all the code in the code box. Another tag is used for quotes.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”