Automatic updater prevents windows from shutting down

Got a problem you cannot solve? Try here.
ulrichard
Posts: 150
Joined: Thu Dec 27, 2007 5:45 am
Location: Switzerland
Contact:

Automatic updater prevents windows from shutting down

Postby ulrichard » Fri Dec 23, 2011 8:00 am

I thought this was discussed here before, but I spent some time searching this forum and the internet.

The problem is as follows:
The automatic update mechanism finds an update.
The user doesn't respond to it. It doesn't matter if the dialog is minimized or not. The dialog that is active at this time is update_notify_download.
In the evening, the user shuts down the computer.
But the InstallAware update checker prevents Windows from shutting down, and Windows presents the same "1 program still needs to close" as when there is unsaved work in some office program.

Since we configured the update mechanism to check for updates every day, there's no incentive to not let the user shut down his computer.

I think the behavior comes from not handling the WM_QUERYENDSESSION windows message or handling it improperly.

http://msdn.microsoft.com/en-us/library/windows/desktop/aa376890%28v=vs.85%29.aspx
http://msdn.microsoft.com/en-us/library/ms700677%28v=vs.85%29.aspx

Is there anything I can do to get the correct behavior?

Rgds
Richard
http://www.pointline.com
http://www.paraeasy.ch
http://ulrichard.ch

giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Automatic updater prevents windows from shutting down

Postby giaviv » Mon Dec 26, 2011 10:49 pm

Hi,

Setups cannot be aborted due to system shutdown because this would leave the system in an inconsistent state. Therefore the shutdown is intentionally being denied. When a shutdown request is detected however, any InstallAware setup that has been minimized to the system tray is brought back into the foreground, so it is obvious what is going on.
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

ulrichard
Posts: 150
Joined: Thu Dec 27, 2007 5:45 am
Location: Switzerland
Contact:

Re: Automatic updater prevents windows from shutting down

Postby ulrichard » Tue Dec 27, 2011 1:55 am

I would distinguish between a setup and an update check.
I can't imagine what inconsistent state could result from aborting while the list of updates for downloading is presented (update_notify_download).

At that stage it doesn't matter if the window is being brought to the foreground or not, as the operating system dims the whole screen for presenting a list of unresponsive applications.

Rgds
Richard
http://www.pointline.com
http://www.paraeasy.ch
http://ulrichard.ch

ulrichard
Posts: 150
Joined: Thu Dec 27, 2007 5:45 am
Location: Switzerland
Contact:

Re: Automatic updater prevents windows from shutting down

Postby ulrichard » Thu Apr 26, 2012 7:28 am

We just had another idea. When exiting our application, we could just kill the updater.
I know this is a bad hack. But that way the computer would shut down cleanly. And the users wouldn't be so annoyed anymore.
But the problem I'm facing with this is that the updater is an elevated process, and thus I can't kill it from my user process.

That brought me to the next idea. I heard that with recent versions of Windows Installer, the updates don't need UAC elevation anymore.
Is this supported with recent InstallAware versions? Also for per machine installations? In my 10 minute research on the InstallAware webpage I couldn't find any information related to that.
If yes, that would be a good reason to upgrade.
http://www.pointline.com
http://www.paraeasy.ch
http://ulrichard.ch

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: Automatic updater prevents windows from shutting down

Postby FrancescoT » Thu Apr 26, 2012 11:05 am

Dear User,

Unfortunately actually it is not available any official news regarding Windows Installer ... I heard too ... but I am not quite sure that will be in that way.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 35 guests