Advice on the best suited architecture for our application

Vannoote, Frederik 21 Reputation points
2020-10-28T11:08:41.62+00:00

We are developing an application which needs to communicate to displays and a cloud server.
Since we need to run the application when nobody is logged in, we run our application as Windows Service. However, we also need to be able to show a UI and talk to the displays over the DDC channel (graphical controller), so we need to run in a graphical session (not in session 0 as the other Windows Services).
To achieve this, we are running an application as a Windows Service which spawns another application in the other available session (session 1, session 2, ...). We know this is ugly. We would like from you some advice on what the alternatives are.

Can we get access to the desktop from a Windows Service?
Can we get access to the display controller from a Windows Service?
Can we show a UI from a Windows Service?
Can we access a USB device (the display is optionally connected through USB as well) from a Windows Service?

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,512 questions
{count} votes

1 additional answer

Sort by: Most helpful
  1. Sean Liming 4,591 Reputation points
    2020-10-28T13:18:58.33+00:00

    Rather that running as a service with a split up app, you could run the application as a shell using shell launcher. Rather than Explorer shell, the application would be the shell and can be the GUI and other service in 1 app. The other method would be to launcher a single app with Windows Run registry key.

    -Sean Liming