Language selection: [日本語(Japanese)]

Restart Manager for Desktop app #6 (Change in behavior of sign-out on Windows 10)

On Windows 10 1709, the default behavior of sign-out (logoff) has been changed. Applications will always be restarted by the Restart Manager. How does this change affect the app?

Restart the app on Windows 10 1709 (Fall Creators Update)

Windows 10 will be upgraded as often as once every six months. For each upgrade, Windows features will be added and updated.

Windows 10 1709 (Fall Creators Update) has changed Windows behavior related to the Restart Manager.

Restarting the app by the Restart Manager that is introduced in Windows Vista occurs when the installer or the like was unable to replace the file that needs updating.

However, from Windows 10 1709, the Restart Manager also restarts the app when signing out / signing in (logoff / logon) due to normal restart or shutdown.

Of course, you can prevent the app from restarting by the Restart Manager. You can change it with “Settings” -> “Accounts” -> “Sign-in options” -> “Privacy”.

By turning off the setting of “Use my sign-in info to automatically finish setting up my device and reopen my apps after an update or restart.” (Wording in Windows 10 1809), the app will not restart.

App restart setting (Settings -> Accounts -> Sign-in options -> Privacy)

Confirm that the app actually restarts

As I mentioned in the last post, I created a test tool to confirm restarting the app.

Restart Manager Test Tool

Download and feature details are here.

There are two EXE files in the zip file. RestartManagerTest.exe is a 32-bit application that can be launched on both 32-bit Windows and 64-bit Windows. RestartManagerTest64.exe is a 64-bit application that can be launched on 64-bit Windows only.

Use this tool to check the behavior of restarting on Windows 10 1809.

Register the app restart in advance

First of all, it is a case to register the app restart before receiving the WM_QUERYENDSESSION message.

  1. Start the Restart Manager Test tool
  2. Uncheck the check box of Call RegisterApplicationRestart()
  3. Click the RegisterApplicationRestart() button to register the app restart
  4. Restart Windows
  5. Result: After signing in to Windows, the app starts automatically

As expected, the app restarts with a sign-in after restarting Windows. No problem.

Register the app restart when receiving WM_QUERYENDSESSION message

Next, when the app receives the WM_QUERYENDSESSION message, it is a case to registers the app restart.

  1. Start the Restart Manager Test tool
  2. Check the check box of Call RegisterApplicationRestart()
  3. Restart Windows
  4. Result: After signing in to Windows, the app does not start automatically

Well, somehow the app does not start after restarting Windows. Under the original specification, the app should restart. Check the log file. The WM_QUERYENDSESSION message can be received with the ENDSESSION_CLOSEAPP (0x00000001) flag set. Also, the API for Registering the app restart (RegisterApplicationRestart()) has been successfully called.

 

The call to RegisterApplicationRestart() is invalid while processing the WM_ENDSESSION message, but it is valid while processing the WM_QUERYENDSESSION message, and it is described in the API specification that it is the last opportunity to call and update the setting using that API.

Therefore, I feel like a Windows bug.

Register as a bug using Feedback Hub app

I registered it as a Windows bug using the Feedback Hub app on 14/Dec/2018. I registered the following item.

Title:
WM_QUERYENDSESSIONのタイミングにおいてRegisterApplicationRestart()での登録が反映されない
(Registration with RegisterApplicationRestart() is not reflected at the timing of WM_QUERYENDSESSION)

I registered in the Japanese version of the Feedback Hub app, so I think that it can only be searched from the Japanese version.

I hope it will be fixed.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.