private string GetWinServiceInfo(string serviceName) { try { serviceName = serviceName.Trim(); var serviceController = new ServiceController(serviceName); return(serviceController.Format()); } catch (Exception ex) { return(string.Format(Resources.GetServiceInfoException, serviceName, ex.Message)); } }