How to disable Windows 11 automatic reboots?

Anonymous
2024-02-18T11:19:20+00:00

Hi,

I have browsed this forum but found so far no real solution:

It has happened to my now several times that I was running tasks over extended periods of time only to come back to my PC the next morning to find Windows 11 had done an automatic reboot! So not only the tasks weren't finished, worse, lots of preparatory work was lost!

I don't want Windows to ever automatically reboot after an update. Never. Ever. Period. I want to be informed about updates, that's fine, and I keep Windows 11 up to date, but under no circumstances ever is it acceptable that Windows just shovels an update on my PC and disrupts overnight tasks and REBOOTS(!) my PC all by itself.

So it would be very helpful if somebody could tell me how to disable these automatic update reboots once and for all. I don't want to "pause" Updates (I absolutely want updates, I just want to control myself when the updates are done) and resetting "work hours" is of no use unless I can set it to 24 hours.

Best regards

Nick

Windows for home | Windows 11 | Windows update

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

84 answers

Sort by: Oldest
  1. Anonymous
    2024-05-30T11:16:23+00:00

    Freegin' Genius! This is the stuff that makes me happy! Simple yet effective!

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2024-05-30T15:06:58+00:00

    Thank you again and FYI: I had to change these lines to remove the double quotes (highlighted in green bold).

    reg add "HKLM\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" /v ActiveHoursStart /t REG_DWORD /d %startHour% /f

    reg add "HKLM\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" /v ActiveHoursEnd /t REG_DWORD /d %endHour% /f

    Was this answer helpful?

    4 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2024-05-30T20:56:32+00:00

    Interesting. The original works for me but so does your change. Thanks.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  4. Anonymous
    2024-06-01T10:15:00+00:00

    It was pointed out that the code I wrote doesn't always work in every locale depending on how your time is reported so I improved it. It'a still a command line cmd batch file:

    for /f %%i in ('powershell "((get-date).Hour+18) %% 24"') do set startHour=%%i
    for /f %%i in ('powershell "((get-date).Hour+12) %% 24"') do set endHour=%%i
     
    reg add HKLM\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings /v ActiveHoursStart /t REG_DWORD /d %startHour% /f 
    reg add HKLM\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings /v ActiveHoursEnd /t REG_DWORD /d %endHour% /f 
    

    Again, save this code as a batch file and use Task Scheduler to run it every couple of hours to update your working hours.

    Image

    Was this answer helpful?

    5 people found this answer helpful.
    0 comments No comments
  5. Anonymous
    2024-06-11T23:45:59+00:00

    What is the answer to this, is there an answer to this?

    Windows 11 just rebooted as I was actively using the machine.

    It's unacceptable to restart without my explicit consent.

    I don't want reboot, edit this, refresh that, install that.

    I want a definitive answer as a customer of this service as to how I enforce CONSENT on my own computer.

    Was this answer helpful?

    10+ people found this answer helpful.
    0 comments No comments