ServiceController.GetServices方法的权限 [英] Permission for ServiceController.GetServices method

查看:70
本文介绍了ServiceController.GetServices方法的权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用ServiceController类的GetServices(machinename)方法枚举在特定服务器上运行的所有Windows服务并获取其状态.我想知道帐户调用此方法所需的最低权限.我不 想停止或启动服务,但只需要显示服务及其状态.

解决方案

穆罕默德·沙克(Hi Muhammed Shakeer),

谢谢您在这里发布.

对于您的问题,这是ServiceController权限.

它具有三个访问级别.

浏览: 控件: 无: ServiceControllerPermissionAccess枚举 . >

我希望这会有所帮助.

最好的问候,

温迪


I am using GetServices(machinename) method of ServiceController class to enumerate all the windows services running on a particular server and get it's status. I would like to know the minimum permission required for an account to call this method. I don't want to stop or start the service but just need to display the services and their status.

解决方案

Hi Muhammed Shakeer,

Thank you for posting here.

For your question, it is ServiceController Permission.

It has three access levels.

Browse: The ServiceController can connect to, but not control, existing services.

Control: The ServiceController can connect to and control existing services.

None: The ServiceController has no permissions. 

For more details, please refer to the MSDN article ServiceControllerPermissionAccess Enumeration.

I hope this would be helpful.

Best Regards,

Wendy


这篇关于ServiceController.GetServices方法的权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆