注册表中有运行状态吗?
我只知道.net的 ServiceController sc = new ServiceController("Apache2");
if (sc.Status != ServiceControllerStatus.Running)
{
sc.Start();//停止了就重启服务
}
sc.Close();
我只知道.net的 ServiceController sc = new ServiceController("Apache2");
if (sc.Status != ServiceControllerStatus.Running)
{
sc.Start();//停止了就重启服务
}
sc.Close();
APACHE是服务,看你用什么工具写代码来看了,而且在什么OS下,它可不是保存在注册表里。