Torna al Thread
ServiceController servizio = new ServiceController("nome", "ServerIP");
//--- lo stoppo solo se è effettivamente in esecuzione o pausa
if (servizio.Status != ServiceControllerStatus.Stopped && servizio.Status != ServiceControllerStatus.StopPending)
{
servizio.Stop();
servizio.WaitForStatus(ServiceControllerStatus.Stopped);
}