1

Premise : "this app is preventing windows from shutting down" doesn't show up in my Windows 10 2-in-1, at least not for the apps affected by my issue.

I noticed that any app (namely : Chrome, Firefox) which is not shut down manually (e. g. Chrome > Menu > Exit) before hitting "shut down", is just forcefully killed by Windows, and appears to be broken on next restart (e. g. Chrome > "restore session")

When shutting down a Macos the apps are closed automatically and correctly (and if they are not , a promo appear - e. g. "terminal" ) - no "restore Chrome message" and chat.

Is there an official / hacky way to achieve the same on Windows 10? (I run the latest stable build at the time of writing)

3
  • 2
    What's Windows 10 2-in-1?
    – Seth
    Commented Jul 4, 2018 at 12:56
  • The 2-in-1 refers to something like a Surface or Switch Alpha 12. It's the name of the category of machine. Commented Jul 4, 2018 at 14:28
  • It's worth noting that Mac OS X does not close apps when shutting down. Mac OS X relies heavily on hibernation... the application's memory is written to the hard drive as the system shuts down and then restored during bootup. From the application's perspective... they never stopped running. Commented Jul 4, 2018 at 17:10

1 Answer 1

2

There are Registry settings to control the timeout before Windows forcefully terminates an application. You can increase the delay, with the caveat that Windows might take longer to shut down. The following times are given in milliseconds.

  • Press Windows and type regedit.
  • Select Regedit and confirm in the UAC dialog to run it.
  • Navigate to HKEY_CURRENT_USER\Control Panel\Desktop (or copy this key and paste into the location box).
  • Right-click on the right pane and select New > DWORD (32 Bit) Value, and name it HungAppTimeout, if it doesn't yet exist.
  • Set its value to 10000 (10,000 ms) as a starting point; increase it if applications don't end gracefully.
  • Right-click on the right pane and select New > DWORD (32 Bit) Value, and name it WaitToKillAppTimeout, if it doesn't yet exist.
  • Set its value to 10000 (10,000 ms) as a starting point; increase it if applications don't end gracefully.

The settings above are per user; if you want to make these changes apply to all new users, make the same changes in HKEY_USERS\.DEFAULT\Control Panel\Desktop.

You can also extend the time for Services to close:

  • Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control.
  • Double-click WaitToKillServiceTimeout and increase from the default (5 seconds), perhaps to 10,000 ms, to give time for any running service to close.
3
  • sorry for the late follow up. is this supposed to tell Windows "wait X time, gently shutdown apps AUTOMATICALLY before starting shutdown and then shut down"?
    – dragonmnl
    Commented Jul 21, 2018 at 4:53
  • When you call "shutdown" without the /f (force) option, i.e. normal Windows shutdown, applications are notified and given time to exit gracefully, e.g. save settings. If they exceed that time limit, they are forcefully terminated. Commented Jul 22, 2018 at 2:43
  • are we talking about shutting down from start menu or command line?
    – dragonmnl
    Commented Jul 22, 2018 at 12:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .