Skip to content

Instantly share code, notes, and snippets.

@u1735067
Last active August 25, 2017 23:22
Show Gist options
  • Save u1735067/02a3ab83bb22b2b6da806f3ab54bd55a to your computer and use it in GitHub Desktop.
Save u1735067/02a3ab83bb22b2b6da806f3ab54bd55a to your computer and use it in GitHub Desktop.
Task Scheduler: error 2147943767 (0x80070557) when starting second action
- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
<Provider Name="Microsoft-Windows-TaskScheduler" Guid="{DE7B24EA-73C8-4A09-985D-5BDADCFA9017}" />
<EventID>104</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>104</Task>
<Opcode>0</Opcode>
<Keywords>0x8000000000000000</Keywords>
<TimeCreated SystemTime="2017-08-25T22:34:23.310635500Z" />
<EventRecordID>12</EventRecordID>
<Correlation />
<Execution ProcessID="1412" ThreadID="12732" />
<Channel>Microsoft-Windows-TaskScheduler/Operational</Channel>
<Computer>Crux</Computer>
<Security UserID="--" />
</System>
- <EventData Name="LogonFailureEvent">
<Data Name="UserName">\Update-blacklist</Data>
<Data Name="ErrorDescription">LogonUserS4U</Data>
<Data Name="ResultCode">2147943767</Data>
</EventData>
</Event>
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Date>2017-08-26T00:28:31.6189683</Date>
<Author>PC\Alex</Author>
<URI>\test</URI>
</RegistrationInfo>
<Triggers />
<Principals>
<Principal id="Author">
<UserId>--</UserId>
<LogonType>S4U</LogonType>
<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>
<StopOnIdleEnd>true</StopOnIdleEnd>
<RestartOnIdle>false</RestartOnIdle>
</IdleSettings>
<AllowStartOnDemand>true</AllowStartOnDemand>
<Enabled>true</Enabled>
<Hidden>false</Hidden>
<RunOnlyIfIdle>false</RunOnlyIfIdle>
<DisallowStartOnRemoteAppSession>false</DisallowStartOnRemoteAppSession>
<UseUnifiedSchedulingEngine>true</UseUnifiedSchedulingEngine>
<WakeToRun>false</WakeToRun>
<ExecutionTimeLimit>PT72H</ExecutionTimeLimit>
<Priority>7</Priority>
</Settings>
<Actions Context="Author">
<Exec>
<Command>C:\hello\blacklist\reload_hello.bat</Command>
<WorkingDirectory>C:\hello\blacklist</WorkingDirectory>
</Exec>
</Actions>
</Task>
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Date>2017-08-26T00:23:38.1714632</Date>
<Author>PC\Alex</Author>
<URI>\Update-blacklist</URI>
</RegistrationInfo>
<Triggers>
<BootTrigger>
<Repetition>
<Interval>P1D</Interval>
<StopAtDurationEnd>false</StopAtDurationEnd>
</Repetition>
<ExecutionTimeLimit>PT30M</ExecutionTimeLimit>
<Enabled>true</Enabled>
</BootTrigger>
</Triggers>
<Principals>
<Principal id="Author">
<UserId>--</UserId>
<LogonType>S4U</LogonType>
<RunLevel>HighestAvailable</RunLevel>
</Principal>
</Principals>
<Settings>
<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
<DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
<StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
<AllowHardTerminate>true</AllowHardTerminate>
<StartWhenAvailable>false</StartWhenAvailable>
<RunOnlyIfNetworkAvailable>true</RunOnlyIfNetworkAvailable>
<IdleSettings>
<StopOnIdleEnd>true</StopOnIdleEnd>
<RestartOnIdle>false</RestartOnIdle>
</IdleSettings>
<AllowStartOnDemand>true</AllowStartOnDemand>
<Enabled>true</Enabled>
<Hidden>false</Hidden>
<RunOnlyIfIdle>false</RunOnlyIfIdle>
<DisallowStartOnRemoteAppSession>false</DisallowStartOnRemoteAppSession>
<UseUnifiedSchedulingEngine>true</UseUnifiedSchedulingEngine>
<WakeToRun>false</WakeToRun>
<ExecutionTimeLimit>PT1H</ExecutionTimeLimit>
<Priority>7</Priority>
</Settings>
<Actions Context="Author">
<Exec>
<Command>C:\hello\blacklist\gen-blacklist.bat</Command>
<WorkingDirectory>C:\hello\blacklist</WorkingDirectory>
</Exec>
<Exec>
<Command>C:\hello\blacklist\reload_hello.bat</Command>
<WorkingDirectory>C:\hello\blacklist\</WorkingDirectory>
</Exec>
</Actions>
</Task>

So, task Update-blacklist with 2 actions fails on second action while another similar (identical in term of rights) task is ok on this same action. And something weird, the username logged in the error of the second action: why is it "\Update-blacklist" ?? It should be PC\Alex.

Feature ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment