Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detect if Windows Service is running of remote machine [duplicate]

Possible Duplicate:
Check status of services that run in a remote computer using C#

Is it possible to check if a given windows service is running on a remote machine using C#?

This is assuming that I have the correct login credentials for that machine.

like image 637
MadSeb Avatar asked Nov 01 '11 19:11

MadSeb


2 Answers

Try this:

sc \\<servername> query <servicename>

like image 198
jdigital Avatar answered Sep 25 '22 02:09

jdigital


WMI, if you're using C# or VB.Net

Otherwise, "SC" is probably the best tool to use from a command line or .bat file.

like image 43
paulsm4 Avatar answered Sep 23 '22 02:09

paulsm4