In Windows 7, Windows Vista and Windows XP, after installing downloaded updates via Windows Update manually or scheduled Automatic Updates automatically, the system will auto-restart or auto-reboot in order to apply all the updates. Despite Windows 7 has added option to allow users to postpone or delay the restart, the computer will still automatically restart sometime later, if the updates required system to be rebooted to finish the installation.

Microsoft started to implement the feature where some system-related updates will only be installed and applied on system restart since Windows XP SP2 (Service Pack 2). Once system completes the installing of updates which requires to restart Windows, system will notify users that it needs to restart, and if there is no response from user in 5 minutes, Windows will automatically reboot the computer, even though user is logged on, and has programs running or documents opened.

The immediate result of Windows automatic restart is that any unsaved data, such as files, documents, spreadsheets, presentations, databases, and servers will be lost, and downloads or processes such as backup or defragmentation that not yet finished will be terminated, directly or potentially causing data lost.

To prevent, avoid and stop Windows from automatically restart, use the trick below to disable the auto restart after installing Windows Updates feature.

  1. Click on Start button, and type gpedit.msc into Start Search or Run command, and hit Enter.
  2. In Local Group Policy Editor, navigate to Computer Configuration -> Administrative Templates -> Windows Components -> Windows Update.
  3. Double click on No auto-restart with logged on users for scheduled automatic updates installations.
  4. Select Enabled radio button and click OK.

    Disable and Stop Windows Update Auto Restart

  5. Close Local Group Policy Editor.

For user of Windows 7, Vista and XP Home edition which does not have a Group Policy Editor, the setting can be added directly in registry with the following registry key and value.

  1. Run Registry Editor (RegEdit).
  2. Navigate to the following registry key:

    HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU

    Note: If the key does not exist, create new key and name accordingly.

  3. Change the NoAutoRebootWithLoggedOnUsers DWORD (32-bit) Value to 1 to disallow auto-reboot. By default, the value is 0 which allow auto-reboot.

    Prevent Auto Reboot After Windows Update

    Note: If the value does not exist, create a new DWORD (32-bit) Value and name accordingly.

  4. Close Registry Editor.

Once the policy is enabled, Automatic Updates will wait for the computer to be restarted by any user who is logged on, instead of causing the computer to restart automatically to complete a scheduled installation. Instead, Windows will not notify users that a restart is required to complete the installation.