Last active
November 8, 2016 10:53
-
-
Save AgentRev/0c52be809758f27573a7 to your computer and use it in GitHub Desktop.
Scheduled task to prevent Windows 10 from constantly waking up in the middle of the fucking night
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-16"?> | |
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"> | |
<RegistrationInfo> | |
<URI>\DisableUpdateWake</URI> | |
</RegistrationInfo> | |
<Triggers> | |
<CalendarTrigger> | |
<Repetition> | |
<Interval>PT1H</Interval> | |
<Duration>P1D</Duration> | |
<StopAtDurationEnd>false</StopAtDurationEnd> | |
</Repetition> | |
<StartBoundary>2016-01-01T00:00:00</StartBoundary> | |
<Enabled>true</Enabled> | |
<ScheduleByDay> | |
<DaysInterval>1</DaysInterval> | |
</ScheduleByDay> | |
</CalendarTrigger> | |
<SessionStateChangeTrigger> | |
<Enabled>true</Enabled> | |
<StateChange>SessionLock</StateChange> | |
</SessionStateChangeTrigger> | |
<EventTrigger> | |
<Enabled>true</Enabled> | |
<Subscription><QueryList><Query Id="0" Path="System"><Select Path="System">*[System[Provider[@Name='Microsoft-Windows-Kernel-Power'] and EventID=42]]</Select></Query></QueryList></Subscription> | |
</EventTrigger> | |
</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>true</StopOnIdleEnd> | |
<RestartOnIdle>false</RestartOnIdle> | |
</IdleSettings> | |
<AllowStartOnDemand>true</AllowStartOnDemand> | |
<Enabled>true</Enabled> | |
<Hidden>false</Hidden> | |
<RunOnlyIfIdle>false</RunOnlyIfIdle> | |
<WakeToRun>false</WakeToRun> | |
<ExecutionTimeLimit>PT1H</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> |
Author
AgentRev
commented
Feb 14, 2016
- Right-click "Raw" and select "Save link as"
- Open Task Scheduler (taskschd.msc)
- Action > Import Task
Also:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU]
"AlwaysAutoRebootAtScheduledTime"=dword:00000000
"RebootRelaunchTimeoutEnabled"=dword:00000000
"NoAutoRebootWithLoggedOnUsers"=dword:00000001
Thumbs up for this!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment