开发者

Is it possible to verify if a Windows Service is running from a different computer?

I'm working on a project that is composed of a few windows services that collect data and persist them into a database. Now I have to develop an administration panel (a windows application) that can show the statuses of windows services to user. I found out how to verify if a windows service is running using C#: How can I verify if a Windows Service is running

But my problem is: my windows services are running on a server and the user will run the adminis开发者_运维知识库tration panel on his/her computer. Is it possible to detect the status of a windows service from another computer. If yes, how?


You can do this with WMI, this example works for me (Obviously comment out the Stop part)


Not a C# developer, but logically speaking, I would make a small background application which checks these services on the server, and then I talk to this application and request the status of any of my services.


You can use the pslist command: It gives you information about the running processes on a remote computer, however you have to provide credentials to access the other computer...

http://technet.microsoft.com/en-us/sysinternals/bb896682

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜