Disable Automatic Reboot

Windows Updates are important, but it can be really annoying when it restarts your computer on you.

Don't disable Windows Updates! Just postpone the automatic reboot.

Windows 10 sets up a scheduled task to reboot the system. Disable that task, and Windows won't reboot. Manually disabling it won't work, as the Windows Update service will keep re-enabling it.

The solution I've been using is to have another task that just disables the reboot task.

To make this easy, copy the below text, paste it into a new file, and save it was "Disable Automatic Reboot.xml" (including the quotes, to make sure the file extension is saved).

Then open your Start Menu and Task Manager. Right-click and select "Import Task...", selecting the file you just created.

<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
  <RegistrationInfo>
    <Author>XdN</Author>
    <Description>Disable Windows Update automatic reboot.</Description>
    <URI>\Disable Automatic Reboot</URI>
  </RegistrationInfo>
  <Triggers>
    <CalendarTrigger>
      <Repetition>
        <Interval>PT1H</Interval>
        <StopAtDurationEnd>false</StopAtDurationEnd>
      </Repetition>
      <StartBoundary>2018-01-01T00:30:00</StartBoundary>
      <Enabled>true</Enabled>
      <ScheduleByDay>
        <DaysInterval>1</DaysInterval>
      </ScheduleByDay>
    </CalendarTrigger>
  </Triggers>
  <Principals>
    <Principal id="Author">
      <UserId>S-1-5-18</UserId>
      <RunLevel>HighestAvailable</RunLevel>
    </Principal>
  </Principals>
  <Settings>
    <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
    <DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
    <StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
    <AllowHardTerminate>true</AllowHardTerminate>
    <StartWhenAvailable>true</StartWhenAvailable>
    <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
    <IdleSettings>
      <StopOnIdleEnd>false</StopOnIdleEnd>
      <RestartOnIdle>false</RestartOnIdle>
    </IdleSettings>
    <AllowStartOnDemand>true</AllowStartOnDemand>
    <Enabled>true</Enabled>
    <Hidden>true</Hidden>
    <RunOnlyIfIdle>false</RunOnlyIfIdle>
    <WakeToRun>false</WakeToRun>
    <ExecutionTimeLimit>PT1H</ExecutionTimeLimit>
    <Priority>7</Priority>
  </Settings>
  <Actions Context="Author">
    <Exec>
      <Command>schtasks</Command>
      <Arguments>/change /tn \Microsoft\Windows\UpdateOrchestrator\Reboot /DISABLE</Arguments>
    </Exec>
  </Actions>
</Task>