Skip to the content
The Update Bureau
Guide · Fix & Manage Updates Restart control Windows 11 & 10

How to stop Windows from restarting by itself after an update

Keep Windows from rebooting while you have work open, using Active Hours, restart notifications, Group Policy or a registry switch.

Most updates install in the background and then need a restart to finish. Windows tries to do that when you are not using the PC, but it can still guess wrong and reboot while a document is open or a long task is running. You cannot turn restarts off for good, because an update that is installed but not restarted is not fully applied, but you can make Windows ask first and keep it away from your working hours.

1. Set Active hours

Windows does not restart automatically during Active hours. By default they are 8 AM to 5 PM, and you can stretch them to cover your real working day: up to 18 hours on current versions of Windows 11 and Windows 10.

  1. Open Settings › Windows Update › Advanced options.
  2. Select Active hours.
  3. Choose Manually, then set the start and end time. Or choose Automatically to let Windows learn your usage.

On Windows 10 the path is Settings › Update & Security › Windows Update › Change active hours.

2. Ask to be notified before a restart

In the same Advanced options page, turn on Notify me when a restart is required to finish updating (on Windows 10 it is called Show a notification when your PC requires a restart to finish updating). Windows then shows a notification instead of surprising you with a restart. You can also schedule the restart yourself from Settings › Windows Update › Schedule the restart, for example for the night.

Together, these two settings are enough for most people.

3. Never restart while someone is signed in (Pro, Enterprise and Education)

If you need a stronger rule, for example on a PC that runs long jobs, use the policy No auto-restart with logged on users for scheduled automatic updates installations.

Group Policy

  1. Open gpedit.msc.
  2. Go to Computer Configuration › Administrative Templates › Windows Components › Windows Update. On newer versions the setting can be under Manage end user experience.
  3. Open Configure Automatic Updates, select Enabled and choose option 4 - Auto download and schedule the install.
  4. Open No auto-restart with logged on users for scheduled automatic updates installations and select Enabled.

Registry or PowerShell

Run PowerShell as administrator:

PowerShell
> $key = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU'> if (-not (Test-Path $key)) { New-Item -Path $key | Out-Null }> New-ItemProperty $key -Name AUOptions -Value 4 -PropertyType DWord -Force> New-ItemProperty $key -Name NoAutoRebootWithLoggedOnUsers -Value 1 -PropertyType DWord -Force

To undo it, remove both values:

PowerShell
> Remove-ItemProperty 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU' -Name NoAutoRebootWithLoggedOnUsers, AUOptions

Limits of this setting:

  • It works only together with AUOptions set to 4, which also tells Windows to download updates automatically and install them on a schedule. It changes how updates behave, not only restarts.
  • If you schedule a restart yourself from the notification, that choice wins and the PC restarts at the time you picked.
  • Microsoft notes that it does not always behave exactly as described, and that many people never sign out, so the restart may never happen. A PC left without restarting runs on unpatched files. Restart manually as soon as you can, and do not leave a PC in this state for weeks.
  • Over Remote Desktop, only active sessions count as signed-in users.
  • If your PC is managed by an organization, IT may already set restart rules and your changes can be overwritten.

Cancel a restart that is already scheduled

If Windows shows a countdown and a restart warning, open a terminal and run:

Command Prompt (Admin)
> shutdown /a

This aborts a shutdown or restart only while the timer is running, and only when the restart was started with a timer. It does nothing once the PC is already closing apps. A restart that Windows Update schedules for a later time is not a shutdown timer: change it in Settings › Windows Update › Schedule the restart, or move your Active hours.

Check if a restart is pending

Windows creates a registry key when an update needs a restart and removes it after the restart. To check from PowerShell:

PowerShell
> Test-Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired'

True means Windows Update is waiting for a restart. False means Windows Update is not, although other installers can still ask for a restart through other keys, such as HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending. Until the restart happens, the update is not fully applied, so a fix from the update's known issues may not be active yet.

Edited by the site editor. Written with AI from Microsoft's own documents, checked by rules and a second AI. How we work · Report a mistake