How to Prevent automatic restart in Windows 10 Anniversary Update?

Page 5 of 8 FirstFirst ... 34567 ... LastLast

  1. Posts : 77
    Windows 7 and Windows 10
       #41

    cbarn said:
    I wonder if you could defer update indefinitely by identifying where in the registry the active hours are stored and having a scheduled task that updates them automatically to keep moving the window forward ...
    Yeah, I suspect that it would work.
      My Computer


  2. Posts : 6
    Win10 Home
       #42

    mmortal03 said:
    Yeah, I suspect that it would work.
    Well, only one way to find out ... I tracked down the registry entries, and I've created three scheduled tasks that use C:\Windows\System32\REG.EXE to update the window. Kind of brute-forced it this way, but it's good for a test. Every 8 hours a task runs that establishes a new 10 hours window, using these parameters:

    ADD HKLM\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings /v ActiveHoursStart /t REG_DWORD /f /d 1
    ADD HKLM\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings /v ActiveHoursEnd /t REG_DWORD /f /d 11

    https://www.tenforums.com/tutorials/4...a.html#option2

    The value after /d is the new hour for that key. It'd be more elegant to write a script that can run at anytime and set a window based on the current hour, and that's actually kind of necessary because a shutdown of any significant length could push you outside the defined window and allow a reboot not too long after you came back up (but hopefully you would've been updated then anyway!)

    Now the wait for a critical update that tries to force a reboot ...
    Last edited by Brink; 26 Oct 2016 at 19:23. Reason: added tutorial link for more info
      My Computer


  3. Posts : 77
    Windows 7 and Windows 10
       #43

    cbarn said:
    Well, only one way to find out ... I tracked down the registry entries, and I've created three scheduled tasks that use C:\Windows\System32\REG.EXE to update the window. Kind of brute-forced it this way, but it's good for a test. Every 8 hours a task runs that establishes a new 10 hours window, using these parameters:

    ADD HKLM\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings /v ActiveHoursStart /t REG_DWORD /f /d 1
    ADD HKLM\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings /v ActiveHoursEnd /t REG_DWORD /f /d 11

    https://www.tenforums.com/tutorials/4...a.html#option2

    The value after /d is the new hour for that key. It'd be more elegant to write a script that can run at anytime and set a window based on the current hour, and that's actually kind of necessary because a shutdown of any significant length could push you outside the defined window and allow a reboot not too long after you came back up (but hopefully you would've been updated then anyway!)

    Now the wait for a critical update that tries to force a reboot ...
    I could be missing something, but I don't see how this works, because that just sets the active hours to 1am-11am. Instead, it needs to be relative to whatever time the UpdateOrchestrator->Reboot scheduled task is set to reboot the machine at. It always needs to keep that time within the active hours window, so that whenever Windows runs the Reboot scheduled task, it discovers that it is trying to do so within the active hours (after which, Windows reschedules Reboot to a new time in the future, just outside of the active hours window).

    So, you need to be checking when the Reboot scheduled task is meant to run, and update the active hours accordingly.
      My Computer


  4. Posts : 9
    Windows 10 Home 64
       #44

    Continually hyper vigilant about forced updates, last night I checked my system tray. NO NOTIFICATIONS. I then checked for updates and found I had updates ready to download. The notice also stated Windows wouldn't download them until my system was idle. BUT... the (stupidly inadequate) 12 hour "active use" selection was on during that time. I checked earlier in the day when it was off and there were no updates to download.

    I don't know if the "active hours" pertains only to restarts, or if it also includes not downloading the updates which would then need a restart to install. I'd REALLY LIKE TO KNOW because I also have "NoJiggle" installed which is supposed to keep Windows from entering the idle state. If downloads proceed during "active hours", it would appear "NoJiggle" worked.

    Weighing another instance of data loss against testing "NoJiggle" any farther, I chickened out, downloaded the updates, and did a manual restart during a time when I didn't have any scheduled TV programs currently recording on NextPVR via my HDHomerun tuner.
      My Computer


  5. Posts : 326
    Windows 10 Home 64 bit x64 Version 22H2
       #45

    Where did you download NoJiggle? I could not find it.
      My Computer


  6. Posts : 9
    Windows 10 Home 64
       #46

    comcom said:
    Where did you download NoJiggle? I could not find it.
    Oops! So sorry, I conflated the names of two .exe programs (Don't Sleep and MouseJiggler) into one non-existent program. The actual name of it is "MouseJiggler" which when downloaded is "MouseJiggle.exe"
    I got it from the source: Mouse Jiggler - Home
    Even after I successfully got it into system start Windows10 nanny didn't allow me to deploy it beyond a single instance, always preceded by dire warnings. So to get it to stick in the system tray, I had to remove Windows protection from ALL unknown applications. (really?? seriously??) But still whenever I do a restart, "MouseJiggle reappears to ask me if I want to run it, and if so, active or zen mode, then the green arrow to send it to the systray. I've chosen active mode so the mouse actually moves about once every second. I'm guessing zen mode is similar to "Don't Sleep" which purports to prevent screen savers, etc., but can be over-riden during a forced restart.
    How to Prevent automatic restart in Windows 10 Anniversary Update?-mousejiggle.jpg
    Will "MouseJiggler" prevent my computer from entering the idle state and defer the downloads which lead to forced updates? Or allow downloads but defer updates until the computer is idle? Or will Windows updates just continue trampling over everything and forcing restarts?
      My Computer


  7. Posts : 6
    Win10 Home
       #47

    mmortal03 said:
    I could be missing something, but I don't see how this works, because that just sets the active hours to 1am-11am.
    Yes, you're missing something ... that's just an example of the commands, I actually have three jobs set to run:
    1. At 2am, active hours are set to 1am-11am
    2. At 10am, active hours are set to 9am-7pm
    3. At 6pm, active hours are set to 5pm-3am


    Brute forced and ugly, but at least good for a test - and so far, it's working: I got a notice over 24 hours ago that a reboot was required and nothing has happened.

    If this was a desktop that was always on, I'd just leave it as-is, 6 lines of code and 3 scheduled tasks would do the trick. However, this is my laptop, so it's more complicated - if I sleep the system, it could miss one of those reset jobs and wake up outside the window (triggering a reboot). I can't just tell set the jobs to "run if missed" because they could run in the wrong order and wind up outside the window as well. I'm thinking a simple job that runs hourly and sets the working window based on that hour - it can be set to run if missed and still do the right thing, and it doesn't have to actually refer to the reboot job's time. Could still glitch (reboot could run before it does) but I'm not sure I can 100% avoid that.
      My Computer


  8. Posts : 6
    Win10 Home
       #48

    cbarn said:
    Brute forced and ugly, but at least good for a test - and so far, it's working: I got a notice over 24 hours ago that a reboot was required and nothing has happened.
    Since the brute-force method was working, I cleaned it up. I've got this batch file (yeah, batch, I'm that old) scheduled to run at startup and repeat every hour after that:

    @echo off
    :: RebootBlock - Blocks automatic reboot by setting the "Active Hours" to
    :: Now thru Now+10hrs. Schedule as an hourly task with:
    :: - A user authorized to run "REG" (normal priv user should work)
    :: - Run whether user is logged on or not
    :: - Hidden
    :: - Scheduled at startup and repeats hourly forever
    :: - Program is "c:\windows\system32\cmd.exe"
    :: - Argument is /c and path to this batch
    :: - Provide path in "Start in (optional):" or scheduler may not run it!
    :: - Run task as soon as possible after scheduled start is missed
    ::
    :: Verify proper operation in Scheduler and via REGEDIT before relying on this!
    ::
    setlocal EnableExtensions DisableDelayedExpansion
    for /f "delims=:" %%1 in ('echo %time%') do SET STARTTIME=%%1
    set /a ENDTIME=%STARTTIME% + 10
    set /a ADJUST=(%ENDTIME% / 24)*24
    set /a ENDTIME=%ENDTIME% - %ADJUST%
    REG ADD HKLM\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings /v ActiveHoursStart /t REG_DWORD /f /d %STARTTIME%
    REG ADD HKLM\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings /v ActiveHoursEnd /t REG_DWORD /f /d %ENDTIME%
    endlocal
    exit
    Fun integer math included to make sure it rolls over the hour properly at midnight.
    Last edited by cbarn; 29 Oct 2016 at 13:08. Reason: Edited because "TIME /T" returns 12-hour time, BAD - "echo %time%" returns 24-hour time, GOOD!
      My Computer


  9. Posts : 2
    Windows 10 Home
       #49

    Well I haven't had a problem at all since disabling the Windows Update service. The service doesn't even become re-enabled when Windows is restarted. Just have to remember to manually check for updates every so often.
      My Computer


  10. Posts : 5,452
    Windows 11 Home
       #50

    PJMaybe said:
    Well I haven't had a problem at all since disabling the Windows Update service.
    Yes, that is the simplest solution, but not for people, who use Windows Defender or Store.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 15:37.
Find Us




Windows 10 Forums