rtyName];
}
// 获取所连接的
计算机的所有服务数据
public string [,] GetServiceList()
{
string [,] services = new string [this.managementClass.GetInstances().Count,4];
int i = 0;
foreach(ManagementObject mo in this.managementClass.GetInstances())
{
services[i,0] = (string)mo["Name"];
services[i,1] = (string)mo["DisplayName"];
services[i,2] = (string)mo["State"];
services[i,3] = (string)mo["StartMode"];
i++;
}
return services;
}
// 获取所连接的
计算机的指定服务数据
public string [,] GetServiceList(string serverName)
{
return GetServiceList(new string {serverName});
}
// 获取所连接的
计算机的的指定服务数据
public string [,] GetServiceList(string serverNames)
{
string [,] services = new string [serverNames.Length,4];
ManagementObject mo = this.managementClass.CreateInstance();
for(int i = 0;i<serverNames.Length;i++)
{
&nb