How to see what's going on during Windows shutdown/logging off process? [duplicate]

Solution 1:

There can be many reasons Windows takes a long time to shutdown. Here are some ways to find out why and to speed it up:

Why:

  1. Enable Verbose Mode. This tells you what is happening during shut down, like 'Stopping Services':

    • Press Win + R
    • Type regedit
    • Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
    • Right click on the right pane, New > DWORD Value. Name it verbosestatus. Double click it, make the value 1.
  2. Check the Event Log:

    • Press Win + R
    • Type eventvwr.msc
    • Go to Applications and Services Logs > Microsoft > Windows > Diagnostics / Performance > Operational.
    • Sort the 'Task Category' column alphabetically.
    • Look at all items under the category 'Shutdown Performance Monitoring'
    • Try to spot anything odd.

What to do:

  1. Change the delay before programs are force closed:

    • Press Win + R
    • Type regedit
    • Go to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control
    • Double click the WaitToKillServiceTimeout
    • Set the value to something smaller (milliseconds - 1000 = 1 seconds)
  2. Use Windows Performance Toolkit (this is a link to another SuperUser answer)

  3. Perform a clean-boot:

    • Press Win + R
    • Type msconfig
    • Click General tab > Selective Startup
    • Uncheck Load Startup items
    • Click the Services tab, check the Hide all Microsoft Services box, and then click Disable All
    • Click OK, and when you are prompted, click Restart.

Now, this should speed it up a lot. From the previous steps, if you are suspicious about any programs, then un-check them first. Then start enabling one-by-one and see which one is causing the problem.

Hope this helps

Solution 2:

From user @shub helpful link:

  1. Run gpedit.msc from the Start menu search
  2. Go to Computer Configuration > Administrative Templates > System
  3. In the right pane, double-click on Verbose vs normal status messages

Once enabled, this setting makes the system display detailed status messages that show each step in the process of starting, shutting down, logging on, or logging off the system.

However, if the “Remove Boot / Shutdown / Logon / Logoff status messages” setting is enabled, this setting will be ignored.

--

Update: I've ended using Windows Performance Toolkit and found out that Comodo Firewall was the problematic program. After reinstalling it, Windows now shutdowns normally.

Solution 3:

Have you checked the eventlog? It will log all problems during startup/shutdown.

You are likekly to find the problem in the system log, but if an application were to hang, it would be in the application log instead.