How to prevent Windows 10 from restarting the computer after installing updates

74,852

Solution 1

The two other solutions don't seem to be working for me as those registry settings were already set on my computer.

Here is an indirect solution, which is to tell Windows Update not to install updates automatically, just download them, and then prompt for installation. The user can then choose when to install them, and restart then.

Go to the following Registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update
Set the AUOptions value to one of the following values:

1 = Never check for updates
2 = Check for updates but let me choose whether to download and install them
3 = Download updates but let me choose whether to install them
4 = Install updates automatically

I set it to 3.

Source: Microsoft Technet Forums: How to stop Windows 10 from automatically restarting, answer by MaxBak83

Solution 2

Setting the "No auto-restart with logged on users for scheduled automatic updates installations" GPO didn't work for me. I woke up this morning and my machine had been rebooted. (I was using the computer last night and didn't even get a warning.)

This suggestion from techjourney.net looks more promising.

  • Open Task Scheduler and navigate to Task Scheduler Library > Microsoft > Windows > UpdateOrchestrator
  • Right click the Reboot task and Disable it.

Windows will attempt to re-enable the task automatically, so you also need to modify permissions on the task file.

  • Go to C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator
  • Open the properties of the Reboot file, open the Security tab and open Advanced Permissions.
  • Take ownership of the file by clicking the "Change" link next to the owner and typing in your name. Disable inheritance via the button at the bottom.

  • Change all permissions to read or read & execute only.

Solution 3

Edit:

Microsoft are going to release a way to snooze updates. The Verge - Microsoft is making it easy to stop Windows 10 rebooting your PC randomly for updates

I'm not sure if the settings app allows you to do this anymore. I have had a look but I cannot find anything. This solution below will work regardless if you have Windows 10 Pro.

In the run dialog box (winkey + R) type "gpedit.msc" (without quotations), hit enter Navigate to Computer Configuration/Administrative Templates/Windows Components/Windows Update Double click on "No auto-restart with logged on users for scheduled automatic updates installations" Enable it and click apply

Ref: Windows 10: Disable automatic reboot for updates

Gpedit

Solution 4

All the suggested hacks workarounds seems not to work with the anniversary update. But there is still an option: You can periodically update the "active hours" in the settings. However, this is no fun to do manually, but there is a small windows service that can do it for you: https://www.udse.de/en/windows-10-reboot-blocker

Solution 5

Here's a .zip containing a .reg file which SHOULD work even in Windows 10 (though I won't know for sure until the next time M$ pushes a Win10 update which requires rebooting):

http://www.geeksalive.com/NoAutoReboot_Win10.zip

Here's the contents of the NoAutoReboot.reg file, but be sure to read the 00ReadMe.txt, too.

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update]
"NoAutoRebootWithLoggedOnUsers"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU]
"NoAutoRebootWithLoggedOnUsers"=dword:00000001
"NoAutoUpdate"=dword:00000000
"AUOptions"=dword:00000004
"AutomaticMaintenanceEnabled"=dword:00000001
"ScheduledInstallDay"=dword:00000000
"ScheduledInstallTime"=dword:00000003
"AllowMUUpdateService"=dword:00000001

Note that for this to be effective you'll need to either restart the Windows Update Service, or just reboot the computer, after installing the registry update.

Share:
74,852

Related videos on Youtube

Laurent
Author by

Laurent

Updated on September 18, 2022

Comments

  • Laurent
    Laurent almost 2 years

    This questions has been answered previously, e.g. here, but all the answers I've seen require using a dropdown in Settings> Update & Security> Advanced Options.

    On my version of Windows 10 Pro, there is no such dropdown:

    Windows update advanced options

    How can I prevent automatic restarts?

    • Laurent
      Laurent almost 8 years
      Windows 10 version 1607 (OS build 14393.10)
    • Ramhound
      Ramhound almost 8 years
      You can also set your activity information. So Windows will only install updates, during those times, you are not active.
    • Laurent
      Laurent almost 8 years
      Yes but the problem with setting the "active" hours is that if I forget to close Excel and leave it open overnight, Windows might reboot during the night, causing me to lose unsaved data. Also, the maximum active timespan is 12 hours, which assumes everybody sleeps at least 12 hours a day...
    • Run5k
      Run5k over 7 years
      @Laurent, when the Creators Update is released next month, one of the changes will increase the maximum Active Hours setting you can configure to 18 hours. Hopefully, you are typically getting at least six hours of sleep!
    • Mike Waters
      Mike Waters over 7 years
      This is just one of the many things that Windows does that slows us down and gets in the way of our work. Although we still use Windows a little here in our business (mostly in WINE or VirtualBox), we've switched to Linux (RHEL, LM MATE 18.1, and Xubuntu 16.04). Linux updates don't slow us down, and there's seldom a need to reboot.
    • Tomas
      Tomas almost 6 years
    • fixer1234
      fixer1234 almost 6 years
      @Tomas, this thread is a far better one than the other. I've voted to make the other a dupe of this one.
    • Tomas
      Tomas almost 6 years
      The older question cannot be a duplicate, because it is older. It is the original one.
    • fixer1234
      fixer1234 almost 6 years
      @Tomas, age isn't the determining factor unless there are two threads that are equally good. If one thread has more and better solutions, or the question is applicable to a wider audience, or is otherwise a better canonical reference, it is better to make that one the one others are linked to. That's a more effective way to help people find the most potential solutions.
  • Moab
    Moab almost 8 years
    gpedit is only for Pro and higher versions, Home or lower does not have gpedit
  • Laurent
    Laurent almost 8 years
    I have Pro so I was able to do this. But it was already enabled (I enabled it a long time ago when I was still on Windows 8). Last night it rebooted again even with this setting enabled.
  • Laurent
    Laurent almost 8 years
    I just went there in regedit and on my PC that key was already set to 1.
  • magicandre1981
    magicandre1981 almost 8 years
    yes, I use this tool to manually search for Updates: superuser.com/a/948069/174557
  • Richard
    Richard almost 8 years
    My computer doesn't have WindowsUpdate
  • magicandre1981
    magicandre1981 almost 8 years
    @Richard create a key with that name if you can't find it
  • Norio Akagi
    Norio Akagi over 7 years
    This doesn't work. I have this enabled, but it still reboots. The most annoying thing is that it reboots during the week, during office hours, while many apps are open, and just forcefully closes them and I lose my work. Every single time. I've been using Windows since 3.1 and didn't mind any of their dubious UI decisions, including the 8 Modern UI. But just let me do my damn job without interruptions. Ironically, they name it Windows 10 "Pro".
  • Norio Akagi
    Norio Akagi over 7 years
    Nope, this doesn't work either. My Windows 10 Pro (with this setting set to 2, (after I deleted the Windows/SoftwareDistribution folder, actually downloaded updates, installed them, and then rebooted, in the middle of my office hours, on Wednesday, 13PM, with several apps open, including an unsaved Word document. Then it proceeded installing the "Aniversary edition" for the next 30 minutes, failed, and then restored my previous version automatically. Cool, now I can wait for the next attempt. Must remember to save anytime I go get grab a cup of coffee.
  • jmgonet
    jmgonet over 7 years
    It did work for me; now I receive a message saying Restart required and then a more ominous We will restart your device outside office hours. But it doesn't restart by itself. There is a button to Restart now.
  • user643011
    user643011 over 7 years
    Does not work. (Windows 10 Version 1607 Build 14393.187)
  • user643011
    user643011 over 7 years
    Does not work. (Windows 10 Version 1607 Build 14393.187)
  • user643011
    user643011 over 7 years
    Does not work. (Windows 10 Version 1607 Build 14393.187)
  • seagull
    seagull over 7 years
    Continuing in the trend of tech blogs not doing proper research and not cross-checking their answers thoroughly enough, the guide doesn't list bitness information properly. The key you posted is only applicable to 32-bit machines. I've added the information for 64-bit machines as well.
  • Steve
    Steve over 7 years
    You should also set the group policy "Enabling Windows UPM to automatically wake up the system to install scheduled updates" to DISABLED. If you don't, Windows will sometimes start your computer when it's off (hibernating), install updates, and turn off again, causing you to lose your hibernation state. This causes you to lose all of your open windows, which is a huge pain.
  • veryRandomMe
    veryRandomMe over 7 years
    Looks like advanced security settings have been disabled in the latest Win 10 Pro 64 bit
  • Mike Simpson
    Mike Simpson over 7 years
    Beware that the task must be disabled first, then the file permissions set. If you do the file permissions first, the task may give an error when trying to set the state to disabled.
  • dallin
    dallin over 7 years
    As far as I can tell, this no longer works. Windows now ignores the permissions on the file and switches "reboot" back to enabled. I do not think there is currently a way to stop Windows from restarting itself, which is absolutely ridiculous.
  • Laurent
    Laurent over 7 years
    The accepted answer seems to still work for me... As the updates don't install automatically, it doesn't reboot. However if I do click to install the updates, it will reboot later without asking, so I make sure to reboot right after manually installing the updates.
  • Ramhound
    Ramhound over 7 years
    You should edit this answer after you have verified it is an actual answer. Review. Why are you submitting identical answers to questions instead of flagging one of the questions as a duplicate?
  • tftd
    tftd over 7 years
    This is ridiculous! I can't believe we need to install this to "fix" something that shouldn't have been "broken" in the first place! So much for being a "pro" version....
  • Tobias Kienzler
    Tobias Kienzler over 7 years
    Did anyone read that option's last paragraph "this does not work if the policy Configure Automatic Updates is not active"? I guess (but could not yet verify) this only works if one also activates said policy as well.
  • Tobias Kienzler
    Tobias Kienzler over 7 years
    isn't it HKLM\SOFTWARE\ Policies \Microsoft\...? Also, this seems to confirm my comment that you have to activate both policies "Configure Automatic Updates" and "No auto-restart with logged on users for scheduled automatic updates installations"
  • Vanav
    Vanav over 7 years
    @TobiasKienzler, I have enabled that policy too, and this policy still doesn't prevent reboot (v1607 build 14393.693).
  • Tobias Kienzler
    Tobias Kienzler over 7 years
    @Vanav And did you choose one of options 2/3, i.e. one where installation does not happen automatically?
  • Evgeni Nabokov
    Evgeni Nabokov over 6 years
    Your first link (The Verge) is broken due to misspelling.
  • Venryx
    Venryx about 6 years
    I also had to do this process for the "C:\Windows\System32\Tasks\Microsoft\Windows\rempl" folder for the auto-restarts to be blocked (disabling the tasks in task-scheduler, then removing all write permissions). At least, I think they are now since it's past the scheduled time now and hasn't restarted. We'll see if MS creates yet another task trying to get past our blocks... -_-
  • Tomas
    Tomas almost 6 years
    Not working, no permission to disable the reboot task, even for admin! I get this message: "The user account you are operating under does not have permission to disable this task"
  • Peter Taylor
    Peter Taylor over 5 years
    For those who prefer to review the code before running it, there's also a PowerShell version by someone else on Github.
  • Palec
    Palec almost 5 years
    This used to work for me, but May 2019 update rebooted my PC even though I had this hack in place. :-( Maybe Reboot_AC and Reboot_Battery have to be hacked the same way, now.