Forum Discussion
How to prevent all Windows 11 auto-reboots and auto-shutdowns?
I'm running Windows 11 on my HP laptop. I have gone into Settings and disabled everything I can find to prevent automatic updates, automatic reboots, and automatic shutdowns. Nonetheless, every 5-10 days, my Windows 11 laptop auto-shuts down. I'm guessing that this is a consequence of some sort of forced security update procedure.
Whatever this is due to, it is totally and completely unacceptable to me.
I need the machine to be up 24x7, because I ssh into it remotely at various random and unpredictable times, and that of course is prevented when the machine is rebooting or shut down.
Is there any way for me to totally prevent these automatic reboots and shutdowns?
PLEASE!!!!!!!!!!
Yes, I understand that automatic security updates are meant for my "protection". However, I have been working in IT and computer security for decades, and I know much, much better how to protect my own machine than some generic software developed at Microsoft that is meant for millions of non-technical, non-IT-aware people to use.
What Microsoft *SHOULD* do is give us the *option* (i.e., only if we select this option) for the following scenario:
Whenever there is a pending software or security upgrade, we are notified and given a way to either (A) accept it at the moment, or (B) postpone its installation until **WE** decide that **WE** are ready for the upgrade to be installed ... and under this proposed option, Microsoft would NEVER (!!!) force any upgrades upon us.
To be clear, I mean this to be an OPTION. In other words, if we don't select this option, then Microsoft's standard "force upgrades upon users" policy will continue.
MacOS gives us the option to deal with security upgrades in *exactly* this proposed manner. Most Linux distros give us the option to deal with security upgrades in *exactly* this proposed manner.
Why does Microsoft seem to be refusing to offer its own users this same option?
Or am I missing something about the Windows 11 software that will indeed allow me to optionally set up my computer to behave in this exact, proposed manner regarding auto-reboot, auto-shutdown, and security upgrades? I hope that I *am* missing something!
I am totally willing to accept all risks that Microsoft thinks (even though they would be wrong in my particular case) that I am facing in taking full, personal responsibility for my own machine's security.
Thank you for any suggestions as to how I can get my Windows 11 machine to never automatically reboot and never automatically shut down.
And again to be clear: by "never", I don't mean "infrequently" or "only now and then" or anything like that. I mean "never" to mean *NEVER* !
- WynforICopper ContributorYou can do this by disabling automatic restart for Windows Updates. Press Windows + I to open the Settings app. Click on Update & Security.
Select Windows Update from the left sidebar. Click on Change active hours. Set the active hours to the times when you are typically using your PC to prevent reboots during these hours.- Ted1967Copper Contributor
WynforI Thats a non-answer as you know well. Thats not what was asked for.
I am in the same situation I find it INCREDIBLY ARROGANT of microsoft to think they have the right to randomly re-boot your PC or laptop at a time of their choosing ! Its INCREDIBLY annoying !
And the sad attempt to re-open things afterwards NEVER WORKS.
Stop controlling my PC, I paid for it, I OWN it, its MINE, DONT TOUCH IT !
- Montana552Copper Contributor
WynforI Not what they asked, please don't waste peoples time. If you don't have any IT experience don't comment on topics like this.
- HippoManCopper Contributor
Thank you very much for your reply, but sadly, it doesn't quite address my problem.
Unfortunately, there are no typical hours when I use that PC. I mostly am away from the PC, and it is mainly used as a gateway for connections via ssh which perform certain functions. These ssh's are triggered by random, unscheduled events whose dates and times can never be predicted.
And the reason for this answer not quite addressing my question is because I made it clear that I *NEVER* want automatic updates. Trying to fit the "active hours" of these forced updates into "typical" hours is not the same as *NEVER* getting forced updates.
But disabling automatic restart at least improves this hugely less-than-ideal situation a little bit.
Thank you again.
- EmanuelssinCopper ContributorGo to Settings > Windows Update. Click on "Pause updates for 7 days." This doesn’t completely disable updates but can buy you some time and prevent sudden reboots for a short period.
- tjmCopper Contributor
I have the same problem! Did anyone find a solution (other than the Pause for 7 days)?
- lDanielHolmCopper Contributor
You can create a batch file that changes your active hours and set up a scheduled task to repeat it every hour -- that way, there is never a time when you are not in active hours, which should block the update restarts.
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
To make the batch file, open Notepad, copy-and-paste the above commands in, then save the file as any name with a .bat extension, for example noreboots.bat. You can save it anywhere, as long as you can find it.
To open the Task Scheduler, press the Windows Key + R at the same time, and write taskschd.msc in the prompt. In the next window, go into Action and click Create Task.
In the next window, in the General tab, give it a name, for instance 'No Reboots'. Then go to the Trigger tab, click New, select Daily, check the box next to Repeat task every: and set to 1 hour (or whatever interval you find appropriate). Click OK, then go to the Actions tab, click New, and click Browse, then navigate to the location you just saved your .bat file to. Select it.
If you are using a laptop, you will then want to go to the Conditions tab, and uncheck the two checked boxes under Power. Otherwise, the task will not start unless you boot the computer up while it's plugged in, and it will disable it if you unplug it.
Credit to The Curate for the idea and the code, from answers.microsoft.com.