I'd like to run an interactive scheduled task at startup, before user logon. By "interactive", I mean that I need to access Windows' CCD api to set the screen resolution/refresh rate/main display ("modesetting" in linux terms), in the interactive session that is presenting the logon screen.
It should be possible to somehow run in the session because programs like sunshine (or other remoting tools) can live before logon/with the user logged out and capture the screen.
I've tried to create a scheduled task to run at logon of the group "INTERACTIVE" (S-1-5-32-545) as mentioned here, but the method doesn't seem to be working anymore, both via UI and powershell the html is rejected with a "out of range" error on the SID.
The use case is when the pc is turned off with some alternative display configurations that don't output to the main monitor, and the next boot requires manual intervention to see the logon screen.