Windows service to start and restart the user process (with a graphical interface)

I need a specific process to constantly work on every user's computer. If this .exe is killed, I must restart it and send a warning.
I immediately thought about creating Windows Service as an ideal solution, but I have a problem:

  • The process launched by this service should be able to interact with the user, for example. be able to show him a graphical interface.
  • my app also sets up a keyboard hook to control the rhythm user, and when I run .exe from a service, this information is not available.

From the service, I can start the process โ€œas a userโ€ (using the LogonUser and CreateProcessAsUser functions), but I still donโ€™t see the graphical interface.
Is it possible? If not, what can I use to achieve the desired functionality?

TIA

+4
source share
1 answer

By default, GUI.exe will be launched in a service session that is separate from the user's interactive session. You need to learn how to create an online service .

+3
source

Source: https://habr.com/ru/post/1381285/


All Articles