Howto prevent auto reboot¶
this sounds quite plausible, not yet tested (as of 2025-06-21)
Make a batch command file eg. disablereboot.bat, i.e. Open notepad and paste the code below:
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
Save the file anywhere on your computer like C:\MyStuff\disablereboot.bat
Then use Task Scheduler:
Press the windows key + R at the same time and in the prompt type:
taskschd.msc
and configure to run the code Daily and repeat every hour for 1 day, i.e.:
in the right panel click Create task
name it whatever way you want in the General tab
In the Triggers tab create a new one with the contents below:
Daily, repeat task every 1 hour for duration at: 1 day
in Actions click in new with the action Start a program and in the browse locate your previous saved bat file, in this example, C:\MyStuff\disablereboot.bat.
This will keep changing your working hours so that it is never not a working hour. This way you will never get an auto reboot and you can choose yourself when to reboot.
Von Jeremias Keihsler vor 9 Monaten aktualisiert · 1 Revisionen