How to *disable* automatic reboots in Windows 10?

Windows 10 lets you 'schedule' a reboot for later. I want to disable it.

Evidently Windows scheduled itself for a reboot last night when I wasn't looking and just closed everything I had been working on the night before.

I reboot on the regular; I don't need Windows to do that for me.

Can I disable it completely? I don't mind if it downloads everything, and then says "hey, you should reboot," but it should never reboot itself, ever.

I'm using the "Pro" edition of Windows 10.


Note: Unfortunately this appears to not work on Windows 10 Home, and I'm not sure of a workable solution for users of this edition.


I posted this as an answer on another question, but as that appears to be a duplicate of this question I'll provide it here too:

You can edit your local group policy settings to force Windows update to only download updates, but wait for your input to install (and therefore reboot.)

Open your start menu and type Group, then click Edit group policy

Expand Computer Configuration \ Administrative Templates \ Windows Components \ Windows Update

Local Group Policy Editor - Windows Update

Double click Configure Automatic Updates and enable the policy, and configure it as needed.

Configure Automatic Updates

Head back to Windows Update and click Check for updates. Once it is done, click on the Advanced options

You should see your new settings being 'enforced.'

Enforced Windows Update settings

After applying this setting on a test VM, I left Windows Update open and noticed it started downloading.

Windows Update Downloading

When it finishes downloading, you get a toast notification that there are updates and you need to install them.

Windows Update manual install

Note that you must click install now. Restarting or shutting down from the start menu does not appear to trigger the install process.


More info:

I'm not sure if editing Local Group Policy is an option in the Home edition of Windows 10, but the same result should be possible through the registry (I haven't tested this as I used the policy method myself). Including this in case non-pro users come looking for an answer too.

  1. Press Win + R and type regedit then hit Enter
  2. Navigate to HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU
    (you may need to create the keys manually if they don't exist)
  3. Create a new DWORD value called AUOptions and enter a value of either 2 or 3.

    2 = Notify before download
    3 = Automatically download and notify of installation

  4. Restart PC

  5. Check for updates
  6. Inspect Advanced Settings

Update following Anniversary Update (1607):

I've seen a lot a few comments lately from people saying this no longer works after the Anniversary Update.

I've been running some tests, detailed in the two blog posts here:

  • Validating Prevention of Automatic Reboots on Windows 10, Version 1607
  • Update on Windows Update... Up Time

These tests have been running for nearly three weeks and I have yet to see any forced reboots.

In light of these results, it appears that this does still work.

Windows 10 Professional Screenshot - 20 Days up time

Things to keep in mind:

  • I did not set any settings around Active Hours or the Reboot Options.
  • DO NOT click the 'Install now' button within the Windows Update UI unless you're ready to install and reboot. Once the updates are installed, there is no stopping Windows from deciding to reboot.
  • Windows will nag you with Toasts, Action Center alerts and banners across your screen. As long as you don't install the updates you're fine (but do do them eventually.)

You can try Windows 10 Reboot Blocker:

A simple Windows-Service that will update this "active hours" timeslot in the background.

It is free and works with the Anniversary update.


I have answered this as part of my attempt to fix another garbage setting in Windows 10 (the way it will wake your device up, and you in the process, to install updates you haven't approved.)

Please consult Step 2 of my guide here. It explains how to modify the "Reboot" task in the "UpdateOrchestrator" section of the Windows Scheduled Tasks list to disable it and stop Windows from interfering with it. With this task disabled, your machine will never reboot unless you instruct it to.

Cheers - Seagull


The best solution to this annoying problem is with Task Scheduler.

Click Start and type Task Scheduler

Navigate to Task Scheduler Library >> Microsoft >> Windows >> UpdateOchestrator

To disable automatic reboots right-click on Reboot and select disable.

enter image description here

Then be sure change the permissions. Should be set to Read & Execute

I also disabled automatic updates by disabling all the tasks in this folder.


Controlling when Windows will Reboot after Windows Updates apply

You can control the time which you allow Windows to automatically reboot per Windows Update operations without disabling anything or forcefully stopping the Windows Update service.

This method will not prevent any Windows Updates from being downloaded or installed ever so OS security patches will still be applied to the system―you just have it reboot when you're ready.

Please note that rebooting may be required before any newly patched vulnerability becomes effective so you need to understand this and still routinely reboot when patches are applied in a somewhat timely manner to ensure your system stays secure.

I will explain with more detail below but essentially this uses a batch script to dynamically set and change the correlated registry values of the the Active hours settings for Start time and End time based on the run time it's executed while ensuring to increment the values to always be hours ahead.


This is a Native Windows Solution

Unlike the Windows 10 Reboot Blocker solution that is not Windows native, this is a 100% Windows native solution that does not require any third party software to complete the task which uses registry keys to manage restart behavior as outlined by Microsoft.


Scheduling with Task Scheduler

Simply schedule a single Batch Script (provided below) with Task Scheduler to run twice a day:

  1. once at 6:05 AM
  2. once as 6:05 PM

Each execution sets the ActiveHoursStart and ActiveHoursEnd times to values making Windows think you're always active and ensures no reboot occurs from Windows Update operations.

The batch logic and the scheduling of this process is simple to scale and adjust should you run into any issue (e.g. you run into issues with Power Saving modes such as Sleep or Hibernate.)


Batch Script

NOTES: The registry values are set in hexidecimal format. Also note that the logic example below expects the script to be executed at a frame of 6:00:00 AM - 6:59:59 AM or 6:00:00 PM - 6:59:59 PM only. This can be adjusted easily with the IF %HH%==XX portion of the logic though; you can also use this same logic to test this functionality to confirm it works as expected changing the value.

@ECHO ON

SET HH=%TIME: =0%
SET HH=%HH:~0,2%

IF %HH%==06 SET StartHour=06 & SET EndHour=13
IF %HH%==18 SET StartHour=12 & SET EndHour=07

CALL :ChangeActiveHours
REG IMPORT "%DynamicReg%"
EXIT

:ChangeActiveHours
SET DynamicReg=%temp%\ChangeActiveHours.reg
IF EXIST "%DynamicReg%" DEL /Q /F "%DynamicReg%"

ECHO Windows Registry Editor Version 5.00                              >>"%DynamicReg%"
ECHO.                                                                  >>"%DynamicReg%"
ECHO [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings] >>"%DynamicReg%"    
ECHO "ActiveHoursEnd"=dword:000000%EndHour%                            >>"%DynamicReg%"
ECHO "ActiveHoursStart"=dword:000000%StartHour%                        >>"%DynamicReg%"
ECHO "IsActiveHoursEnabled"=dword:00000001                             >>"%DynamicReg%"
GOTO :EOF

Hex values for decimal 0-255

enter image description here


The Registry

For some detail on the correlated registry settings this will change, below I'll reference the portions of A closer look at Active Hours in Windows 10 for what this method will affect.

Active Hours

Active Hours don't change that behavior, but they add a mechanic to the Windows 10 operating system that makes sure users are not disturbed by reboots during active hours.

Active Hours and the the Registry

  1. Tap on the Windows-key, type regedit.exe, and hit enter.

  2. Confirm the UAC prompt.

  3. Navigate to the following key using the tree hierarchy on the left:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings

The following options are provided here:

  • ActiveHoursEnd: defines the end time of the feature.
  • ActiveHoursStart: defines the start time of the feature.
  • IsActiveHoursEnabled: if set to 1, the feature is enabled. If set to 0, it is disabled.

If you want to change the starting or end hour of the feature, double-click on one of the entries. Switch to a decimal base on the prompt that opens, and enter the starting hour using the 24 hour clock system.

Please note that you cannot add minutes in the Registry only full hours.

source


Confirming

To confirm this works as excepted you will

  1. press the enter image description here key one time, and then start typing in Windows Updates until you see the Windows Update Settings options and then click on it

enter image description here

  1. click on the Change active hours option within the *Update settings section

enter image description here

  1. take note of the Start time and the End time values in the Active hours windows and press Cancel and then close entirely out from the Settings screens.

enter image description here

  1. run the batch script now ensuring the values are set in the variables accordingly for the time you run the script to ensure it sets the values for the Start time and End time accordingly and ensure it runs without error (run as admin if needed).

  2. Now do steps 1 - 3 again and confirm the Start time and End time values changed correctly.


Disabling

When you are ready to allow Windows Updates to reboot the machine per it's update operations, you can do so manually since this method does not stop Windows Updates from being downloaded and installed. If you need to disable this job though, that can be done by disabling the scheduled task that executes it with Task Scheduler.


Further Resources

  • Registry keys used to manage restart
  • REG
  • Task Scheduler
  • Task Scheduler Scheduled Batch Script not Running Check
  • Scheduling with Task Scheduler
  • Hex values for decimal 0-255

enter image description here