I need to check and see if the “Server” service is running. Easy enough, using a method like this: How can I verify if a Windows Service is running
The problem comes in when the OS installation is not English. For example on a Windows installation, the “Server” service is known as “Serveur”. Obviously I don’t want to hardcode separate languages into my app. Anyone have any good ideas for doing this cleanly?
Test out the following code and see what results you get, you may be surprised…