rendered paste bodyusing System;
using System.ServiceProcess;
namespace ServiceListApplication
{
public class MyApplication
{
public static void Main()
{
ServiceController[] ServiceList = ServiceController.GetServices();
System.Console.WriteLine("Service\t\tStatus\t\tService name\n------------------------");
for (int i = 0; i < ServiceList.Length; i++)
{
string tmpvar;
tmpvar = ServiceList[i].ServiceName + "\t\t" + ServiceList[i].Status + "\t\t" + ServiceList[i].DisplayName;
System.Console.WriteLine(tmpvar);
}
Console.WriteLine("------------------------\nPress any key to continue");
Console.ReadKey();
return;
}
}
}