FLS
Posts: 29
Joined: Thu Jun 29, 2006 1:46 pm
Location: Nashville, Tennessee, U.S.A.

Problem With AutoCloseApplication

I cannot seem to make the program close, despite what I have tried.

Following is the .ini file and everything other than AutoCloseApplication works fine:



;aiu;

[AccuStudio Desktop 1.0.6]
Name = AccuStudio Desktop 1.0.6
Description = Version 1.0.6 Of The AccuStudio Desktop Program | Updated: September 21, 2006
Feature = NOTE: ALWAYS DO A COMPLETE BACKUP OF YOUR EXISTING ACCUSTUDIO FILES PRIOR TO INSTALLING OR UPDATING THIS SOFTWARE PROGRAM!!
Feature1=This has the most recent version of the program.
URL = http://www.fls-tech.com/AR3/AccuStudio_ ... esktop.msi
Size = 1827840
RegistryKey = HKLM\SOFTWARE\AccuStudio\AccuStudio Desktop\Version\Version
Version = >=1.0.6
Replaces = All
AutoCloseApplication=[APPDIR]AccuStudio_Desktop_Menu.exe



Any help would be greatly appreciated!
:)
FLS
Posts: 29
Joined: Thu Jun 29, 2006 1:46 pm
Location: Nashville, Tennessee, U.S.A.

I have also tried replacing the last line with the following:



AutoCloseApplication=[APPDIR]AccuStudio_Desktop_Menu.exe|;AccuStudio Desktop
FLS
Posts: 29
Joined: Thu Jun 29, 2006 1:46 pm
Location: Nashville, Tennessee, U.S.A.

Lastly, I've tried it this way:



AutoCloseApplication = %ProgramFiles%\AccuStudio\AccuStudio Desktop\AccuStudio_Desktop_Menu.exe



...and it still doesn't work. I give up. I hope some of you can help me here.

Thanks
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,

The problem is that the main window of your application does not have the WS_SYSMENU and WS_CAPTION styles set. These are used by the Updater when it searches for the window to which it will send the WM_CLOSE message.

The solution to this problem would be to create a dummy window which has the WS_CAPTION style set and an unique title. It will always be hidden and its responsibility will be to close the application by handling the WM_CLOSE message appropriately.

An additional note: this solution will work in the next version of AI (scheduled next week), because there was a bug which affected the window searching algorithm.

Regards,
Ionut
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/
FLS
Posts: 29
Joined: Thu Jun 29, 2006 1:46 pm
Location: Nashville, Tennessee, U.S.A.

Thank you
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,

We have made the window title search algorithm more flexible such that the above procedure is not necessary. In the next version of AI, the application will be closed successfully - you just need to specify the window title:
AutoCloseApplication=[APPDIR]AccuStudio_Desktop_Menu.exe|;AccuStudio Desktop


Regards,
Ionut
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/
FLS
Posts: 29
Joined: Thu Jun 29, 2006 1:46 pm
Location: Nashville, Tennessee, U.S.A.

Great! I look forward to it!

Thanks again and keep up the good work guys!
cenigma13
Posts: 1
Joined: Thu Aug 02, 2007 10:04 am

Ionut wrote:Hi,

We have made the window title search algorithm more flexible such that the above procedure is not necessary. In the next version of AI, the application will be closed successfully - you just need to specify the window title:
AutoCloseApplication=[APPDIR]AccuStudio_Desktop_Menu.exe|;AccuStudio Desktop


Regards,
Ionut
Hi,

I have a similar application which will minimize to system tray whenever close/minimize is clicked by user. However, specifying the window title is not closing the application before update process.

Please provide some pointers.

Regards,
Gaurav
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi Gaurav,

Sorry for the lated answer.

Since your application is minimized when receives the WM_CLOSE massages you need to create a dummy window which has the WS_CAPTION style set and an unique title. You will use this title as "Auto Close Application" option.

This window will always be hidden and its responsibility will be to close the application by handling the WM_CLOSE message appropriately.

Hope this helps,
Gigi
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”