My goal is to send sudo poweroff
via ssh to a server that is attached to my computer via LAN when I choose the shutdown menu in windows 10 Home.
I tried the Windows Task Scheduler with
- start at an event with System, User32 and 1074,
- start at an event with System, User32 and 6006,
- start at an event with System, User32 and 109,
- start at local disconnect of user session,
Yet none of them work when pressing the button. They only work when another Task runs the shutdown command.
Now the part with "send sudo poweroff
via ssh to a server that is attached to my computer via LAN" is solved by plink.
What do I use as trigger for the task to fire when the shutdown menu is chosen via mouse?