5

Wait! Please do not mark this as a duplicate until you have read this entire question and all the comments. I know full well there is supposed to be a highly upvoted solution here but it is problematic because there have been many important changes to windows since the question was first answered. Some of these changes completely invalidate aspects of the solution (for example see ramhound's first comment in this question here). Also there are now 27 comments below the top answer so any additional comments are unlikely to be read.

So now my question: I wish to prevent windows from rebooting after doing an update because sometimes I want to leave my PC performing a task unattended for up to a week at a time. Can it be done?

SOLUTION FOUND: Windows 10 Reboot Blocker:

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

It is free, simple and it works.

Jan 2023: Still no unwanted reboots!

Mick
  • 1,563
  • 7
  • 34
  • 61
  • Instead of submitting a solution within the question body, submit an actual answer, to the duplicate question. – Ramhound Sep 04 '18 at 11:52
  • Please don't [edit] your question to include the answer, answer your own question. Please read [Can I answer my own question?](https://superuser.com/help/self-answer) – DavidPostill Sep 04 '18 at 11:57
  • @DavidPostill: Because the question has been marked as a duplicate I am blocked from adding an answer. – Mick Sep 04 '18 at 12:44
  • @Mick You can answer the duplicate question ... – DavidPostill Sep 04 '18 at 16:24
  • My preferred answer is already an answer to the "duplicate" question - but that Q&A is a hideous quagmire of complex answers and dozens of comments where the top voted answers no longer work. You only get to find out that they don't work if A) you read enough of the comments or worse B) you try out the answer only to have windows trash your batch data days or weeks later. I dread to think how many thousands of people have lost valuable work due to the incorrectness of the "top" answers on that page. – Mick Sep 04 '18 at 16:43
  • @DavidPostill: I love StackExchange and the up/down voting system works just fine 99.99% of the time. But this is an exceptional case: a solution that used to work may no longer work and the gap between trying a "solution" and finding out whether it really works or not may be days or weeks. In this odd case the voting system is not working so well. The question needs to be asked and answered afresh. This issue is important to at least a quarter of a million people. – Mick Sep 06 '18 at 09:55
  • Duplicates are flagged not just based on the accepted answer of the duplicate. OP of this Q notes a utility that fixes the problem for them. That utility is noted in one of the answers on the duplicate question, which means that this is indeed a duplicate. – music2myear Jan 12 '23 at 00:51

1 Answers1

3

There are 2 routes you can go.

1: disable windows updates, and only enable it periodically when you want to manage your windows updates.

This can be done by disabling the windows update service (wuauserv). Make sure you not just stop it, but also set it to disabled.

Below a batch script that you can use to manage enabling and disabling automatic updates. Make sure you run this as administrator.

@echo off

set /p q=Do you want to (e)nable or (d)isable windows update?

if "%q%"=="e" goto enable
if "%q%"=="d" goto disable

echo.
echo Answer invalid. Enter e or d.
pause
goto end


:enable
sc config "wuauserv" start=auto
net start wuauserv
pause
goto end


:disable
net stop wuauserv
sc config "wuauserv" start=disabled
pause
goto end


:end

This is useful for when you administrate a server and are not on it a lot (so you don't get surprised by sudden update installs.

2: postpone after an update. If you work behind the computer on a daily basis, with the creators update, you can set the active hours fairly large (from 7:00 till 2:00 or something alike). Windows will install the updates as usual, but when it is done it will wait with the reboot until outside of these hours. It will give you a notification telling you that it will reboot later today. When you see this message, you can postpone the reboot for upto a week of time. The next day, you can postpone for another extra day, and you can keep doing this for as many times as you want.

So if you postpone it for a week, then 5 days later, you can again postpone it for a week, making it 5+7=12 days.

Alternatively, you can choose to disable the windows update service when this message comes up, then kill the windows update process to stop the automatic reboot. If you decide to go this route, you can simply stop the windows update service (cmd as admin: net stop wuauserv) Next restart, it will automatically start the service again.

LPChip
  • 59,229
  • 10
  • 98
  • 140