I usually hibernate my Windows XP Pro development PC at the end of the day rather than shutting it down. Although I’ve saved my work, I’ve typically got lots of windows open with everything set up the way I want it for the task at hand. It can be days or even weeks between reboots.

But when Windows does an automatic update, it forces me to reboot. It puts up a dialog box saying it will reboot in five minutes unless I click the equivalent of a “snooze” button. This happened the other day, and I missed it because I was looking something up in a book at the time – end result, the computer reboots and I have to spend time getting back to where I was.

My friend Jon has kindly offered the following solution to my problem. It will be a while until I know whether it works, but if you don’t see an update to this post then you may assume that it has. I hope you find it useful too.

The fix

Although it’s probably possible to fix this in the registry directly, it’s safer to use the Microsoft Management Console.

  1. Click Start, Run
  2. Type mmc.exe and click OK
  3. File, Add/Remove Snap-in
  4. Add...
  5. Add Group Policy Object Editor
  6. Click Finish, Close and OK to dismiss the three dialogs
  7. Navigate to Computer Configuration\Administrative Templates\Windows Components\Windows Update
  8. If these are all set to Not Configured (mine were) then change No auto-restart with logged on users for scheduled automatic update installations to Enabled

That should be it. Fingers crossed!

Update 2008-12-18

I did an automatic update today, and got a much more reasonable notification message once it completed:

So it looks like this change may have done the trick.

Alternatively, you can make the change in the registry (which works on home operating system variants that don’t come with a group policy editor).

  1. Run regedit.
  2. Navigate to or create HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU.
  3. Create NoAutoRebootWithLoggedOnUsers as a DWORD with value 1.

I used this technique to prevent automatic reboots on a Windows 7 Home Premium computer.

See http://support.microsoft.com/kb/328010 for full details.