Microsoft

Stop Windows from rebooting after automatic updates

Using local Group Policy or a simple Registry hack, you can prevent Windows Update from automatically rebooting.

Automatically downloading and installing Windows updates directly from Microsoft or from an internal server running Windows Server Update Services (WSUS) is a good way to ensure your systems keep their operating system and software up to date.

But when the update requires a reboot, it always seems to happen at the least opportune moment—right in the middle of large file transfer. While you can often postpone the reboot, Windows will keep nagging you until you give in or the OS will just take matters into its own hands and restart after four hours. This can be really frustrating.

In TR Dojo Challenge question from September 30th, I asked TechRepublic members how they could prevent Windows from rebooting after performing an automatic update.

Configure Windows Update through local Group Policy

On machines running Windows XP Pro with at least SP2, Windows Vista Business, or Windows 7 Pro, you can configure Windows Update using the Group Policy snap-in (gpedit.msc) for the Microsoft Management Console (MMC).

  1. Stop all running instances of Windows Update AutoUpdate Client (wuauclt.exe) using the Task Manager. (This may or may not be required for the steps below to work, but it can't hurt.)
  2. Open the Group Policy MMC snap-in by clicking Start | Run and entering gpedit.msc (Windows XP Pro) in the Run box or by clicking Start and entering gpedit.msc in the Search box (Windows Vista Business and Windows 7 Pro).
  3. Expand Computer Configuration.
  4. Right-click Administrative Templates and click Add/Remove Templates.
  5. Click Add.
  6. Click Wuau.adm in the Windows\Inf folder and click Open. (See Figure A.)

    Windows Update Group Policy Administrative Template

  7. Click Close.
  8. Under Computer Configuration, expand Administrative Templates, Windows Components, and Windows Update.
  9. Double-click the policy No auto-restart for scheduled Automatic Updates installations.
  10. Select Enabled. (See Figure B.)No auto-restart for scheduled Automatic Updates installations Group Policy
  11. Click OK.
  12. Close the Group Policy snap-in for MMC.

Configure Active Directory WSUS clients through Group Policy

For Active Directory Windows WSUS clients, you can also configure the settings for WSUS and Automatic Updates using Group Policy. The process is similar to steps outlined above for editing Windows Update local Group Policy. For more information and a complete description of the process, read the Microsoft articles:

Editing the Registry

On computers running Windows XP Home SP2, Windows Vista Home versions, or Windows 7 Home versions, you can't use the Group Policy MMC snap-in, but you can make the same change by editing the registry.

  1. Stop all running instances of Windows Update AutoUpdate Client (wuauclt.exe) using the Task Manager. (This may or may not be required for the steps below to work, but it can't hurt.)
  2. Open the Registry by clicking Start | Run and entering regedit in the Run box (Windows XP Home) or by clicking Start and entering regedit in the Search box (Windows Vista or Windows 7).
  3. Back up the Registry
  4. Navigate to the key: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU
  5. Add a new DWORD value named NoAutoRebootWithLoggedOnUsers.
  6. Set the value to 1. (See Figure C. If you set the value to 0 the machine will allow automatic reboots.)
  7. Close the Registry Editor.NoAutoRebootWithLoggedOnUsers Windows Registry Value

For more information on configuring Windows automatic updates using group policy checkout the following resources:

And the TechRepublic swag goes to...

This week's coffee mugs and laptop stickers to GreatZen, who was first to mention using Group Policy to configure Windows Update, medo35_2010, who was first to outline the above registry edit, and ray.mosely, who provided an link to an excellent resource on how to prevent your changes from being undone by Windows Update. Thanks to everyone who submitted an answer.

You can also sign up to receive the latest from the TR Dojo through one or more of the following methods:

About

Bill Detwiler is Managing Editor of TechRepublic and Tech Pro Research and the host of Cracking Open, CNET and TechRepublic's popular online show. Prior to joining TechRepublic in 2000, Bill was an IT manager, database administrator, and desktop supp...

Editor's Picks