public static bool IsSeclogonWinServiceRunning() { var ret = false; var servName = "seclogon"; try { if (WinServiceHelper.GetStatus(servName) == (int)ServiceControllerStatus.Running //& WinServiceHelper.GetStartMode("seclogon") == (int)ServiceStartMode.Automatic ) { ret = true; } } catch (Exception ex) { return(false); } return(ret); }