Page 1 of 4 123 ... LastLast

  1. Join Date : Sep 2016
    Posts : 2
    Windows 10 Home 64bit
       06 Oct 2016 #1

    A solution to stop Win10 from auto-rebooting after updates.


    Windows rebooted my PC again the other day, without warning, while I was using it. This is the 3rd time it has done this since "upgrading" to Windows 10. I've tried every possible work-around I can find, but MS keeps "fixing" them so they don't work. I don't have Windows Pro, so I can't use the GPEdit method. The active hours thing is useless, I it set to 10am to 10pm, but I'm on the computer outside of those hours too. It was just after 10pm and I had finishing typing something and I was proof reading it. Windows thought the system was idle and it went straight to the grey installing updates screen. There was no warning at all.

    The first time Windows decided to reboot for updates was shortly after installing Windows 10. I had some work open when I needed to go to bed. I put the computer in sleep mode so everything would be the way I left it when I got up. I wake up in the morning to find my machine turned on and everything I had open was gone. It turns out Windows had downloaded updates during the day and although I have wake timers disabled, it woke the machine up during the night to install the updates and reboot it. That's when I discovered that Windows Update creates a reboot task after downloading updates. Modifying, disabling or deleting it doesn't work because it gets recreated by Windows Update every time it installs updates.

    TL;DR
    I don't want to disable automatic updates, so I have not done the metered connection work-around or completely disabled the update service. I wish I could have it notify that updates are available and let me chose when to download and install them like I could in Windows 7, but I'd settle for a way to stop it from rebooting and losing all of my work, and I think I might have come up with a way. I won't know for sure until the next time Windows Update runs, but I've done some tests and I think it will work. What I have done is create a scheduled task that runs a command to disable the reboot task. I have it set to run when the computer is idle for 5 minutes, which should beat out the 10 minutes the reboot task is set for. The command you need to run is "C:\Windows\System32\schtasks.exe /change /tn \Microsoft\Windows\UpdateOrchestrator\Reboot /disable". If you don't know how to create a scheduled task, then do the following:
    • Open the Task Scheduler by clicking start and begin typing "task scheduler" until you see it appear in the list, then click on it.
    • Right click and select "Create New Task..." (not basic task).
    • On the General tab: Name it whatever you want (I called it Disable WU Reboot). Under Security options, change the user to run as SYSTEM, then check "Run whether user is logged on or not" and "Run with highest privileges."
    • On the Triggers tab: Click new, in the Begin the task drop down list, select "On idle."
    • On the Actions tab: Chose Start a program from the Action drop down list. In Program/script put "C:\Windows\System32\schtasks.exe" then in the Add arguments (optional) box, put "/change /tn \Microsoft\Windows\UpdateOrchestrator\Reboot /disable"
    • On the Conditions tab: Check "Start the task only if the computer is idle for" and select 5 minutes from the drop down list.
    • Click OK

    If you leave the task to run as your user, when using the computer while reading something, watching a video over 5 minutes, etc., the screen will flicker or a brief flash of what looks like the command prompt will flash when it runs the task. This is because the system is technically idle and it runs the command. I found this annoying, but since changing it to run as SYSTEM, it doesn't do it anymore.
    Last edited by NJC2; 14 Oct 2016 at 20:45.
      My System SpecsSystem Spec


  2. Join Date : Jan 2015
    UK, Midlands
    Posts : 6,205
    Win 10 Pro (1607)
       06 Oct 2016 #2

    Try running a utility like Don't Sleep (free) and set it to disable restart.
      My System SpecsSystem Spec


  3. Join Date : Sep 2016
    Posts : 2
    Windows 10 Home 64bit
       14 Oct 2016 #3

    dalchina said: View Post
    Try running a utility like Don't Sleep (free) and set it to disable restart.
    Why install a program when I can just use what's built into Windows?

    Anyway, it worked like a charm. I completely forgot it was patch Tuesday until remote logged into my Windows 7 Pro machine and had a notification that updates were available. I checked my Windows 10 machine and it had downloaded updates too. The reboot task had been re-created and scheduled to reboot just after 10pm (my active hours are 10am to 10pm), but it had already been disabled by my task by the time I checked. I re-enabled it and I made sure I was at the machine it was still enabled when it ran. The first time the reboot task runs is when it pops up the notification, and if you're using the machine, it re-schedules it for an hour later. After that, it no longer pops up a notification and either reboots if your system is idle or re-schedules it an hour later if it's not. I watched it the rest of the night, put the system to sleep and kept watch the next day to see what it does.

    The reboot task kept getting re-enabled, I'm assuming by Windows Update because I checked the last run time on the other tasks and did not see any that were doing it. My task kept the reboot task disabled before it could run though. I thought there might be a problem if the reboot task got enabled and I put my system to sleep that it would wake up to install updates and reboot like it did once before. It seems that "on idle" tasks get run when you put the system to sleep, so it wasn't a problem. I reduced my tasks run time to 4 minutes idle because the reboot task seems to trigger a reboot if your machine is idle for 5 minutes.

    If you want to do this yourself, use this XML code to import the task into Windows Task Scheduler.
    Code:
    <?xml version="1.0" encoding="UTF-16"?>
    <Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
      <RegistrationInfo>
        <Date>2016-10-13T14:08:07.2288437</Date>
        <Author>NJC2 on TenForums.com</Author>
        <URI>\Disable Windows Update Reboot Task</URI>
      </RegistrationInfo>
      <Triggers>
        <IdleTrigger>
          <Enabled>true</Enabled>
        </IdleTrigger>
      </Triggers>
      <Principals>
        <Principal id="Author">
          <UserId>S-1-5-18</UserId>
          <RunLevel>HighestAvailable</RunLevel>
        </Principal>
      </Principals>
      <Settings>
        <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
        <DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
        <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
        <AllowHardTerminate>true</AllowHardTerminate>
        <StartWhenAvailable>false</StartWhenAvailable>
        <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
        <IdleSettings>
          <Duration>PT4M</Duration>
          <WaitTimeout>PT0S</WaitTimeout>
          <StopOnIdleEnd>false</StopOnIdleEnd>
          <RestartOnIdle>false</RestartOnIdle>
        </IdleSettings>
        <AllowStartOnDemand>true</AllowStartOnDemand>
        <Enabled>true</Enabled>
        <Hidden>false</Hidden>
        <RunOnlyIfIdle>true</RunOnlyIfIdle>
        <WakeToRun>false</WakeToRun>
        <ExecutionTimeLimit>PT72H</ExecutionTimeLimit>
        <Priority>7</Priority>
      </Settings>
      <Actions Context="Author">
        <Exec>
          <Command>C:\Windows\System32\schtasks.exe</Command>
          <Arguments>/change /tn \Microsoft\Windows\UpdateOrchestrator\Reboot /disable</Arguments>
        </Exec>
      </Actions>
    </Task>
    Copy it and save it to a .xml file ("Disable Windows Update Reboot Task.xml" for example), then in Task Scheduler, click Action, Import Task and select the file you just saved.

    Or create it yourself using the following:
    • Create new task
    • General Tab: Change User or Group to SYSTEM
    • Triggers Tab: On Idle
    • Actions Tab: Start program: C:\Windows\System32\schtasks.exe, Add arguments: /change /tn \Microsoft\Windows\UpdateOrchestrator\Reboot /disable
    • Conditions Tab: Start the task only if the computer is idle for: 4 minutes, Wait for idle for: Do not wait
      My System SpecsSystem Spec


  4. Join Date : Jan 2015
    UK, Midlands
    Posts : 6,205
    Win 10 Pro (1607)
       15 Oct 2016 #4

    Why install a program when I can just use what's built into Windows?
    'cos it's dead simple.
      My System SpecsSystem Spec


  5. Join Date : Jul 2016
    Posts : 23
    Windows 10 Home 64 bit x64
       15 Oct 2016 #5

    dalchina said: View Post
    'cos it's dead simple.
    Agree. Not everyone wants to mess with codes and settings, and any new Windows update might make the codes go wrong or no longer work.
    If there is a program that can do it I would use a program, it is easier to change back to previous settings or uninstall the program when something goes wrong.

    Unfortunately, Don't Sleep does not work for my Window 10 Home premium 64bit.
      My System SpecsSystem Spec


  6. Join Date : Jan 2015
    UK, Midlands
    Posts : 6,205
    Win 10 Pro (1607)
       15 Oct 2016 #6

    Hi, would be interested if you could say in what circumstance it doesn't work..
    On win 10 Pro it blocks sleep perfectly.

    I've not been able to definitively show it blocks restart related to an update... I've never had an unexpected restart and always been notified of one pending. Even when the restart notification has occurred during active hours and I've left it pending after that period, with nothing to stop the PC restarting - and really idle- it still didn't restart automatically.

    I don't want to try uninstalling updates and reinstalling them just to check this for obvious reasons...

    Thanks!
      My System SpecsSystem Spec


  7. Join Date : Jul 2016
    Posts : 23
    Windows 10 Home 64 bit x64
       15 Oct 2016 #7

    Click image for larger version. 

Name:	A9oveny.png 
Views:	4 
Size:	83.2 KB 
ID:	106091
    @dalchina, My Windows Update page is always opened (is always left opened on desktop) so I can monitor the situation to see if any updates are auto installed. The image above is taken before the auto restart occurred. I did close and reopen it sometimes, I am not sure if the windows update page would auto refresh or not if it stayed idle opened on desktop.

    After an update is auto installed, the active hours setting option will disappear inside the windows update options, and it will display a message it is going to restart outside active hours. (see image above)

    Click image for larger version. 

Name:	eQRwsgH.png 
Views:	83 
Size:	13.5 KB 
ID:	106092
    This is my Don't Sleep settings and it does not prevent the restart. After the active hours ended I encountered a blue screen and an auto restart. It happened about 15mins after the active hours ended and I was using my PC when the blue screen auto restart happened.
    Last edited by comcom; 15 Oct 2016 at 21:23.
      My System SpecsSystem Spec


  8. Join Date : Oct 2014
    Trnava
    Posts : 1,625
    Windows 10 Pro x64
       15 Oct 2016 #8

    comcom said: View Post
    This is my Don't Sleep settings and it does not prevent the restart.
    That is most likely, because you have "AutoEndTasks" enabled, it closes any app preventing a shutdown.

    Anyway, an interesting approach, glad you have got it working, other option is to block MusNotification.exe.
      My System SpecsSystem Spec


  9. Join Date : Jul 2016
    Posts : 23
    Windows 10 Home 64 bit x64
       15 Oct 2016 #9

    TairikuOkami said: View Post
    That is most likely, because you have "AutoEndTasks" enabled, it closes any app preventing a shutdown.

    Anyway, an interesting approach, glad you have got it working, other option is to block MusNotification.exe.
    Can you teach me how to disable AutoEndTasks

    You mentioned in another post add something in reg, but I am not sure where and how to add in reg (I am not a coder). Can you provide me the step by step on how you block AutoEndTasks and MusNotification.exe

    Thanks

    (Note: I did not adjust any registry settings after installing Windows 10)
      My System SpecsSystem Spec


  10. Join Date : Oct 2014
    Trnava
    Posts : 1,625
    Windows 10 Pro x64
       15 Oct 2016 #10

    Run CMD and copy/paste:
    reg add "HKCU\Control Panel\Desktop" /v "AutoEndTasks" /t REG_SZ /d "0" /f

    Take ownership of "C:\Windows\System32\MusNotification.exe" and remove it, but some update might restore it later.
      My System SpecsSystem Spec


 
Page 1 of 4 123 ... LastLast


Similar Threads
Thread Forum
Win10 blank screen after updating and rebooting
I just did another clean install of Win10 and all went smoothly except for one problem. After the updates were installed I rebooted my laptop and then I noticed after coming back from my dinner a blank black screen with not even a mouse cursor....
Installation and Setup
Solved How to get away from Auto Updates from Win10
So I just got Windows 10 and did a clean install (no upgrade). Now I am going through some of the settings I want turned on and off, but the whole Windows auto update thing is a bit confusing. On Windows 7 I have "Check for updates but let me...
Windows Updates and Activation
Disable Auto Updates Group Policy - Managing Video Driver Updates?
I know Brink and Tairiku (experts I'm sure) have contributed to a solved thread "Turn Off Windows Updates" but here I am with an MBA in Finance and still somewhat confused based on what I'm trying to do. It's all about the Nvidia drivers. I...
Windows Updates and Activation
Win10 install keeps rebooting, stuck in reboot mode
Sorry if this has already been posted, but I'm stuck in reboot and don't know how to get out. I left my computer to install overnight. When I came to it this afternoon, it looks like it might have completed, but was still in some set up condition,...
Installation and Setup
Updates need reboot to finish, but rebooting doesnt resolve (10122)
Folks, since updating from 10074 to 10122, I've got several updates (security and otherwise) which, if I look in update history, report that they need a reboot to finish installing, but after rebooting, they all still report that they need a reboot...
Windows Updates and Activation
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 23:31.
Find Us
Twitter Facebook Google+



Windows 10 Forums