0

Note: Read, before you vote for duplicate question!

I need to execute a program on every log on. By that I used these energy settings to test the behaviour:
enter image description here

And I force the log on screen on wakeup, too:
enter image description here

Now I created a new task and created a trigger for At log on of any user, but it never fires. It fires only if I restart my machine completely or it wakes up from hibernation but not if only the monitors are switched on again.

I did some research and some people suggest to use the event id 42 or 1 as trigger, but this does not work for Windows 10.

Is there a separate event for "log on after monitor wake up"?

mgutt
  • 858
  • 1
  • 14
  • 29
  • Possible duplicate of [Trigger Task Scheduler in Windows 7 when computer wakes up from sleep/hibernate](http://superuser.com/questions/84442/trigger-task-scheduler-in-windows-7-when-computer-wakes-up-from-sleep-hibernate) – Bungicasse Jan 09 '17 at 11:37
  • @Bungicasse No its not. You should read the question first. – mgutt Jan 09 '17 at 11:53

1 Answers1

1

Maybe there is an easier way (feel free to answer), but this is how I solved it by myself:

1.) Open the Group Policy Editor by running gpedit.msc in the windows search.

2.) Navigate to Local Computer Policy -> Computer Configuration -> Windows Settings -> Security Settings -> Advanced Audit Policy Configuration -> System Audit Policies - Local Group Policy -> Logon/Logoff and activate the monitoring for Audit Logon and Success
enter image description here

3.) Now create your task and set a trigger for the protocol Security, the source Microsoft Windows security auditing. and the event 4624
enter image description here

Finished!

mgutt
  • 858
  • 1
  • 14
  • 29