Deprecated solution: Only works in earlier Windows versions than Windows 10
Taken from: Run a script when Windows resumes from suspend/hibernate state?
On an event - In the system log, the "Power-Troubleshooter" Source will log an event code of 1 when you wake up from a sleep state.
Possible explanation of the Windows 10 behaviour:
The default handling in Windows 10 is that shut down is treated as hibernate, so start up resumes from hibernation and does not start from scratch, as restart does - @AFH
I have tested that, Only on a restart of the Windows 10 operating system would trigger action that I have made.
Even if I chose Trigger to be At startup, it seems that task does not detect that Windows 10 were started up.
I'm using Windows 10 Home version.
Where could I get some help?
Testing results I provided:
Last run results: 0x103
Exported Task I used for testing: Chrome Preload.xml
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Date>2017-06-21T13:05:39.6050683</Date>
<Author>DESKTOP-6519MDL\vaida</Author>
<URI>\Chrome preload</URI>
</RegistrationInfo>
<Triggers>
<BootTrigger>
<Enabled>true</Enabled>
</BootTrigger>
<EventTrigger>
<Enabled>true</Enabled>
<Subscription><QueryList><Query Id="0" Path="System"><Select Path="System">*[System[Provider[@Name='Power-Troubleshooter'] and EventID=1]]</Select></Query></QueryList></Subscription>
</EventTrigger>
</Triggers>
<Principals>
<Principal id="Author">
<UserId>S-1-5-21-1438360845-2802100473-3542379989-1002</UserId>
<LogonType>Password</LogonType>
<RunLevel>HighestAvailable</RunLevel>
</Principal>
</Principals>
<Settings>
<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
<DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
<StopIfGoingOnBatteries>true</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>true</Hidden>
<RunOnlyIfIdle>false</RunOnlyIfIdle>
<WakeToRun>false</WakeToRun>
<ExecutionTimeLimit>PT30S</ExecutionTimeLimit>
<Priority>7</Priority>
</Settings>
<Actions Context="Author">
<Exec>
<Command>"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"</Command>
</Exec>
</Actions>
</Task>