Dectecting the Presence of a Windows Service App

  • Thread starter Thread starter Bob
  • Start date Start date
B

Bob

From within a Windows Form based App, I wish to detected whether or not
a particular Windows Service App is running. What is the best way to do
this? I am writing is vb.net

Thanks,


Bob
 
The .NET framework provides the System.ServiceProcess namespace. The
SystemController class has a static method called GetServices that returns
an array of all the services running on a system.

Dim services() As System.ServiceProcess.ServiceController
services = System.ServiceProcess.ServiceController.GetServices()

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director
 
Back
Top