How to Fix: Stop Win10 Update Restart / Reboot (Updated)

Dennis Faas's picture

Infopackets Reader Steve P. writes:

" Dear Dennis,

I have a question regarding the Microsoft policy to have Windows 10 reboot after an update automatically. Oftentimes the automatic reboots cause me to lose my work (example: open documents, open tabs on my browser, certain folders open, etc). I would prefer to have it so that Windows 10 doesn't reboot on updates. I understand the policy to reboot on update is forced Windows 10 users but can this be prevented? "

Update 20200701: The script below now works with Windows 10 1909 and Windows 10 2004 branches.

My response:

You can stop Windows 10 from rebooting on updates using two easy methods, which I will describe below.

Before I get into that, please note that the reason the Windows 10 "automatic update on reboot" policy exists is so that users do not disable the Windows Update feature and/or delay applying important security updates as they have done in the past. This is ever-so important, especially in the wake of WannaCry Ransomware that spread like wildfire in recent months - with the only way to stop it by applying Windows updates.

With that said there are two ways you can make it so that Windows 10 doesn't reboot after updates: one is built into Windows which delays a scheduled update reboot to specific hours - this feature is only available in newer editions of Windows 10. The other option is to 'hack' Windows 10 to stop reboots on updates altogether.

How to Fix: Stop Windows 10 Update Restart / Reboot

Option #1: Schedule Your Own Reboots During Specific Times

To set your own schedule for reboots using specific hours (rather than having the system reboot on its own schedule), you will first need to know what version of Windows 10 you are running. To do so: click Start, then type in "winver" (no quotes); wait for "winver" to appear in the list, then click it.

The anniversary update is version 1607, OS build 14393, released August 2016. You need at least this version number or higher to be able to schedule your reboot during certain hours. If you are using an older version than 1607 (such as 1507), your Windows Update is most likely broken and will need to be fixed (you can contact me directly for help in this matter).

Assuming you have at least version 1607 or higher, you can schedule your update reboots by doing the following:

Click Start, then click the PC Settings (cog wheel) icon, then go to Update and Security, then click Windows Update. In the middle of the page (somewhat near the bottom), click the option for "Change active hours", and set the scheduled windows update reboots during a time that won't affect your work.

Option #2: Stop Windows 10 Automatic Reboots on Updates Permanently

Another option is to block Windows 10 reboots after updates. After much research online, I discovered that the Windows 10 update on reboot is a script that is part of Task Scheduler. I've seen solutions that suggest modifying the Windows 10 update 'reboot' script so that it becomes disabled - however, the easiest way around this is to simply rename the script so it does not execute.

Update 20200701: The script below now works with Windows 10 1909 and 2004 branches.

To do so:

  1. Click Start, then type in "cmd" (no quotes); wait for "CMD.EXE" or "Command Prompt" to appear in the list, then right click it and select "Run as Administrator". Next, highlight the text below using your mouse:

    cd c:\windows\system32\tasks\microsoft\windows\updateorchestrator
    if not exist "reboot.old" copy reboot reboot.old && del reboot && mkdir reboot && icacls "reboot" /inheritance:r /deny "Everyone:(OI)(CI)(F)" "ANONYMOUS LOGON:(OI)(CI)(F)"
    if not exist "reboot_ac.old" copy reboot_ac reboot_ac.old && del reboot_ac && mkdir reboot_ac && icacls "reboot_ac" /inheritance:r /deny "Everyone:(OI)(CI)(F)" "ANONYMOUS LOGON:(OI)(CI)(F)"
    if not exist "reboot_battery.old" copy reboot_battery reboot_battery.old && del reboot_battery && mkdir reboot_battery && icacls "reboot_battery" /inheritance:r /deny "Everyone:(OI)(CI)(F)" "ANONYMOUS LOGON:(OI)(CI)(F)"
    if not exist "uso_uxbroker.old" copy uso_uxbroker uso_uxbroker.old && del uso_uxbroker && mkdir uso_uxbroker && icacls "uso_uxbroker" /inheritance:r /deny "Everyone:(OI)(CI)(F)" "ANONYMOUS LOGON:(OI)(CI)(F)"
    echo this is a dummy line
  2. Right click over the above highlighted text, then select "Copy" from the dialogue menu.
  3. Next, go to the administrative command prompt you opened previously and right click in the middle of the window and select "Paste". The text you copied above should now be paste into the command prompt window with the commands executed.

This should now stop Windows 10 from rebooting on updates.

Note that you will have to apply this "fix" for every major update to Windows 10 which comes out twice a year, because the major updates will likely overwrite these changes.

Undoing the Above Script (Make Windows 10 Reboot on Updates)

If you wish to undo the above script, you can execute the following script using the same method:

cd c:\windows\system32\tasks\microsoft\windows\updateorchestrator
if exist "reboot.old" takeown /f reboot >out.txt && icacls reboot /reset /T >out2.txt && rmdir /q /s reboot && copy reboot.old reboot && del reboot.old
if exist "reboot_ac.old" takeown /f reboot_ac >out.txt && icacls reboot_ac /reset /T >out2.txt && rmdir /q /s reboot_ac && copy reboot_ac.old reboot_ac && del reboot_ac.old
if exist "reboot_battery.old" takeown /f reboot_battery >out.txt && icacls reboot_battery /reset /T >out2.txt && rmdir /q /s reboot_battery && copy reboot_battery.old reboot_battery && del reboot_battery.old
if exist "uso_uxbroker.old" takeown /f uso_uxbroker >out.txt && icacls uso_uxbroker /reset /T >out2.txt && rmdir /q /s uso_uxbroker && copy uso_uxbroker.old uso_uxbroker && del uso_uxbroker.old
echo this is a dummy line

I hope that helps.

Additional 1-on-1 Support: From Dennis

If all of this is over your head, or if you need help preventing Windows 10 from automatically rebooting after an update - I can help using my remote desktop support service. Simply contact me, briefly describing the issue and I will get back to you as soon as possible.

Got a Computer Question or Problem? Ask Dennis!

I need more computer questions. If you have a computer question -- or even a computer problem that needs fixing -- please email me with your question so that I can write more articles like this one. I can't promise I'll respond to all the messages I receive (depending on the volume), but I'll do my best.

About the author: Dennis Faas is the owner and operator of With over 30 years of computing experience, Dennis' areas of expertise are a broad range and include PC hardware, Microsoft Windows, Linux, network administration, and virtualization. Dennis holds a Bachelors degree in Computer Science (1999) and has authored 6 books on the topics of MS Windows and PC Security. If you like the advice you received on this page, please up-vote / Like this page and share it with friends. For technical support inquiries, Dennis can be reached via Live chat online this site using the Zopim Chat service (currently located at the bottom left of the screen); optionally, you can contact Dennis through the website contact form.

Rate this article: 
Average: 5 (4 votes)


dan400man's picture

Genuinely curious as to why, after copying the reboot file to reboot.old and deleting the reboot file, the reboot folder is created? Does this prevent the OS from recreating the reboot file?

Dennis Faas's picture

The answer is that Task Scheduler will attempt to execute the reboot file at a specific path, however that file has been deleted. In that case, task scheduler, or perhaps a Windows Update will replace the reboot file at that specific location. Now, if the reboot directory is located in the same path, then attempting to copy a file into that location (where the directory is) will instead copy the file into the directory. Hence, the "reboot" file will not longer be executable because it is in fact a directory.

Consider this command:

copy c:\reboot c:

... would copy the file "reboot" to c.

However, if the directory "c:\reboot" already exists and you attempted to c:\reboot (file) to c:, it would in fact copy the "reboot" file to the "reboot" directory and you would end up with: c:\reboot\reboot.

dan400man's picture

Hmmm. I think that would be poor behavior on Windows' part to do that. So I tested this and got an "Access is denied" error, which seems more appropriate behavior.

Still, it has the desired effect.