Create screenshots when running as Windows Service

Viewed 79

I've created a java program which is installed as a Windows service on a win10 machine using winsw. This program needs access to the current user desktop as it periodically creates screenshots (using java.awt.Robot) and processes them.

Because windows services run in their own session0 that isn't possible (I get black images). So how can I create my screenshots without creating another program which is run by the user session itself?

1 Answers

You should set <interactive> True in your configurations file in order to allow service to interact with Session 0. But in UAC OS(Windows vista or Above) services are no longer allow to interact with the Desktop.

ex :- <interactive />

For further information read this.

Related