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).
- 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.)
- 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).
- Expand Computer Configuration.
- Right-click Administrative Templates and click Add/Remove Templates.
- Click Add.
- Click Wuau.adm in the Windows\Inf folder and click Open. (See Figure A.)
- Click Close.
- Under Computer Configuration, expand Administrative Templates, Windows Components, and Windows Update.
- Double-click the policy No auto-restart for scheduled Automatic Updates installations.
- Select Enabled. (See Figure B.)
- Click OK.
- 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:
- Managing the WSUS Automatic Updates Client Download, Install, and Reboot Behavior with Group Policy
- Windows Server Update Services (WSUS): Configure Clients Using Group Policy
- Windows Client TechCenter: Automatic Updates Policy Settings
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.
- 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.)
- 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).
- Back up the Registry
- Navigate to the key: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU
- Add a new DWORD value named NoAutoRebootWithLoggedOnUsers.
- Set the value to 1. (See Figure C. If you set the value to 0 the machine will allow automatic reboots.)
- Close the Registry Editor.
For more information on configuring Windows automatic updates using group policy checkout the following resources:
- How to configure automatic updates by using Group Policy or registry settings (Microsoft Knowledge Base article 328010)
- How to configure and use Automatic Updates in Windows XP (Microsoft Knowledge Base article 306525)
- How to configure and use Automatic Updates in Windows 2000 (Microsoft Knowledge Base article 327850)
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: