Most of the time, Windows downloads updates quietly in the background while you are working and then installs them at your next shutdown or restart. However, if you wait too long to reboot on your own or your update occurs at a scheduled time, the operating system may warn you that it’s going to reboot in a few minutes, unless you postpone further messages for a certain time (usually 10 minutes to 4 hours). If you fail to postpone, Windows will reboot without your permission.
Fortunately, you can set Windows 8.1, Windows 8 or Windows 7 to stop automatically restarting after updates with a simple change to the registry.
1. Launch the Registry Editor by hitting Windows + R, entering regedit into the dialog box and hitting Enter.
2. Navigate to HKEY_LOCAL_MACHINE/SOFTWARE/Policies/Microsoft/Windows.
3. Create a new registry key called WindowsUpdate under Windows if one does not already exist. You can create a new registry key by right clicking on the Windows key, selecting New then Key and renaming the folder which appears to WindowsUpdate.
4. Create a new registry key named AU under WindowsUpdate.
5. Create a DWORD Value named NoAutoRebootWithLoggedOnUsers in the AU Key. To create a new DWORD value, right click in the right window pane and select New then DWORD Value. Then rename the value as needed.
6. Set NoAutoRebootWithLoggedOnUsers to 1. You can set the value by double clicking on the DWORD name and entering the appropriate number in the dialog box which appears.
7. Close the Registry Editor and Reboot.