Updater auto-close does not work if application window not activated - Advanced Installer Community
dybalabj
Posts: 58
Joined: Thu Jan 09, 2014 2:00 am

Updater auto-close does not work if application window not activated

I am including the Auto-Updater in my installer (Advanced Installer Professional 12.6.1). My WPF application is built using VS2015 targeting .NET 4.0 (but typically running under .NET 4.5.2 or higher). I tested this behavior on Windows 7 x64.

The auto-close feature does not appear to work if the application window has not been activated at least once before the update installs. If I click on the window before the update begins installing, then the auto-close appears to work fine.

The WM_CLOSE message does not appear to be received by my application unless the window is activated at least once. To confirm, I added a handler for WndProc and log when the WM_CLOSE message is received. If the window has been activated at least once (either by clicking on it or calling Window.Activate()), then the log shows WM_CLOSE was received. If the window has NOT been activated, then the WM_CLOSE message does not appear in the log before the update begins to install.

I also tried generating the update configuration file using both the "language specific codepage" and "UCS-2 encoding" settings, but the behavior was the same in both cases.

I can work around this by including a call to Window.Activate() before starting the updater process, but it would be nice if this wasn't necessary.


Thanks,

Brandon
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Updater auto-close does not work if application window not activated

Hi Brandon,

I tested your scenario and, indeed, I reproduced the problem. This seems to be an Advanced Installer issue. A fix will be available in a future version of Advanced Installer, thank you for bringing it to our attention.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Updater auto-close does not work if application window not activated

Hi Brandon,

We tried to fix this, but it seems that the problem is not reproducible in the newest versions anymore. Can you try this and see if you still encounter this problem?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”