How to prevent Windows 10 from restarting the computer after installing updates
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
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.
Related videos on Youtube
Laurent
Updated on September 18, 2022Comments
-
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:
How can I prevent automatic restarts?
-
Laurent almost 8 yearsWindows 10 version 1607 (OS build 14393.10)
-
Ramhound almost 8 yearsYou can also set your activity information. So Windows will only install updates, during those times, you are not active.
-
Laurent almost 8 yearsYes 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 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 over 7 yearsThis 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 almost 6 yearsPossible duplicate of How to stop Windows 10 from automatic restarts
-
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 almost 6 yearsThe older question cannot be a duplicate, because it is older. It is the original one.
-
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 almost 8 yearsgpedit is only for Pro and higher versions, Home or lower does not have gpedit
-
Laurent almost 8 yearsI 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 almost 8 yearsI just went there in regedit and on my PC that key was already set to 1.
-
magicandre1981 almost 8 yearsyes, I use this tool to manually search for Updates: superuser.com/a/948069/174557
-
Richard almost 8 yearsMy computer doesn't have WindowsUpdate
-
magicandre1981 almost 8 years@Richard create a key with that name if you can't find it
-
Norio Akagi over 7 yearsThis 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 over 7 yearsNope, this doesn't work either. My Windows 10 Pro (with this setting set to
2
, (after I deleted theWindows/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 over 7 yearsIt 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 over 7 yearsDoes not work. (Windows 10 Version 1607 Build 14393.187)
-
user643011 over 7 yearsDoes not work. (Windows 10 Version 1607 Build 14393.187)
-
user643011 over 7 yearsDoes not work. (Windows 10 Version 1607 Build 14393.187)
-
seagull over 7 yearsContinuing 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 over 7 yearsYou 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 over 7 yearsLooks like advanced security settings have been disabled in the latest Win 10 Pro 64 bit
-
Mike Simpson over 7 yearsBeware 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 over 7 yearsAs 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 over 7 yearsThe 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 over 7 yearsYou 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 over 7 yearsThis 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 over 7 yearsDid 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 over 7 yearsisn'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 over 7 years@TobiasKienzler, I have enabled that policy too, and this policy still doesn't prevent reboot (v1607 build 14393.693).
-
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 over 6 yearsYour first link (The Verge) is broken due to misspelling.
-
Venryx about 6 yearsI 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 almost 6 yearsNot 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 over 5 yearsFor those who prefer to review the code before running it, there's also a PowerShell version by someone else on Github.
-
Palec almost 5 yearsThis 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.