Windows 7 is shutting down unexpectedly, according to the logs.

Posted by dlamblin on Super User See other posts from Super User or by dlamblin
Published on 2009-07-29T16:51:31Z Indexed on 2010/03/19 18:31 UTC
Read the original article Hit count: 527

Here's a message from my eventvwr EventLog (Windows Logs > System):

The previous system shutdown at 11:51:15 AM on ?7/?29/?2009 was unexpected.

This is funny because I was wondering why the system shut down while I was playing Civilizations IV full screen. Now I know. It was unexpected.

Has anyone encountered and resolved this?

A little background:

I am running Windows 7 RC inside VMWare Fusion 2 (just updated a few months back) on a MacBook (Bitterly not Pro) aluminum-body. Windows 7 occasionally will shut down. This isn't a quick turn-off, it's a shutdown where all the programs are exited, the system waits until they quit (and Civ4 doesn't prompt me to save), it even installed Windows Updates before restarting. And yes it is restarting right after the shutdown. Because I run a game in full screen mode I do not notice any dialog with a countdown timer or anything like that that might be a warning.

As I have iStat on my dashboard widgets I can see about 8 temperature monitors. I have seen the CPU get up to 74C before, but during the shutdown, though it seemed hot to the touch (always is), it read 61C for the CPU, 60C for heatsink A, 50C for heatsink B and in the 30s-40s for the enclosure and harddrives. As I type this now, the temps are actually higher, so I don't think the temperature caused it.

I have at least six such events dating first from 5/17 which was a week after installing Windows 7.

I did find one information level warning from USER32 in the system log that says:

The process C:\Windows\system32\svchost.exe (DLAMBLIN-WIN7) has initiated the restart of
computer DLAMBLIN-WIN7 on behalf of user NT AUTHORITY\SYSTEM for the following reason:
 Operating System: Recovery (Planned)
 Reason Code: 0x80020002
 Shutdown Type: restart

And another 15 minutes before that from Windows Update:

Restart Required: To complete the installation of the following updates, 
  the computer will be restarted within 15 minutes: 
- Cumulative Security Update for Internet Explorer 8 for Windows 7 Release Candidate
  for x64-based Systems (KB972260)

Which I think kind of explains it. Though I don't know why restarting after an update would create an error event of "shutdown was unexpected", isn't that pretty odd?

Now, how do I set it to never restart after an update unless I click something.

Application of solution:

As fretje reminded me, there's a couple of configurable settings for this, in windows 7 they're much in the same place as in Windows 2000 SP3 and XP SP1. Running gpedit.msc pops up a window that looks like:


Windows 7 has changed the order and added a couple of newer options I've italicized:

  1. Do not display 'Install Updates and Shut Down' in Shut Down Windows dialog box
  2. Do not adjust default option to 'Install Updates and Shut Down' in Shut Down Windows dialog box
  3. Enabling Windows Power Management to automatically wake up the system to install scheduled updates
  4. Configure Automatic Updates
  5. Specify intranet Microsoft update service location
  6. Automatic Updates detection frequency
  7. Allow non-administrators to receive update notifications
  8. Turn on Software Notifications
  9. Allow Automatic Updates immediate installation
  10. Turn on recommended updates via Automatic Updates
  11. No auto-restart with logged-on users for scheduled Automatic Updates
  12. Re-prompt for restart with scheduled installations.
  13. Delay Restart for scheduled installations
  14. Reschedule Automatic Updates schedule

© Super User or respective owner

Related posts about windows-7

Related posts about windows-update