This project has moved and is read-only. For the latest updates, please go here.

Cannot have windows with handles (eg NativeWindow) when running at boot in system account???

Topics: Errors
May 8, 2013 at 4:15 PM
I want to have an app that waits for the windows GUID_MONITOR_POWER_ON event that is picked up through WndProcs ... so we need a window :( ... but these cannot seem to be created at the login screen before a user logs in as it only seems to work when the "run only when user is logged in" option is ticked

Now I don't need any interface visible to the user at all ... but this seems to be the ONLY way of picking up when windows turns your screen off and on ... so I am hoping I can solve this issue ... any ideas?

May 9, 2013 at 4:21 PM
I don't know if this will work, but I would try registering the task using the System or Local Service account and then assigning the EventTrigger or SessionStateChangeTrigger to call whatever action you need to take place. Make sure your action does not require access to resources (networking, files, etc.) that may not be available to the account under which you registered the task.