C
C#2y ago
caique

❔ Services communication in Windows Services

I need to create a service to start a service. It is possible? The service that would be affected is a backup monitoring, the service i have to make is supposed to check if it is running by a timer, if it's not it should run it. I just need to know if it is possible to make, and how to do that
5 Replies
JakenVeina
JakenVeina2y ago
seems like "create a service" is probably a poor solution for what you really want, but yes, there is a C# API for creating services, and a C# API for manipulating services
caique
caiqueOP2y ago
being the two services from Windows Services, how do i could communicate them? idk if this is a dumb question, im really really new on this
JakenVeina
JakenVeina2y ago
you don't you communicate with the OS which provides APIs for interacting with services
JakenVeina
JakenVeina2y ago
ServiceController Class (System.ServiceProcess)
Represents a Windows service and allows you to connect to a running or stopped service, manipulate it, or get information about it.
Accord
Accord17mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.

Did you find this page helpful?