1

My Store app registers itself for restart using RegisterApplicationRestart and that does indeed cause it to restart upon an update. However, the Microsoft documentation asserts that the Store always sends a WM_QUERYENDSESSION message before updates to discover if apps may be shut down. I need that to occur because this app runs whenever the user is logged on and is therefore almost certainly open when an update is requested. However, the shutdown query evidently occurs only after the first attempt at the update is aborted with an error message saying that my app is open. Then if the user retries the update the message is sent and the app can reply affirmatively to the shutdown, which then proceeds successfully. Is there no way to have the OS send the query message on the Store's first update attempt??

Terry Peterson
  • 121
  • 1
  • 8

1 Answers1

1

It turns out that this problem is caused by a bug in the Microsoft Store app! The problem occurs if one selects an individual app for updating. But the WM_QUERYSHUTDOWN message is sent and the update succeeds without an error and need to retry if one instead (1) clicks on the 3-dot menu, (2) selects Downloads and updates, (3) clicks the Get Updates button, and (4) then waits for all updates to finish.

Terry Peterson
  • 121
  • 1
  • 8