如何防止用户更改Windows Service的启动类型 [英] how to prevent user from changing the startup type of Windows Service

查看:179
本文介绍了如何防止用户更改Windows Service的启动类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我用c#编写Windows服务,
如何防止用户更改Windows Service的启动类型??
谢谢!

Hi All,

I write a windows service by c#,
How to prevent user from changing the startup type of Windows Service???
Thank you!

推荐答案

您无法阻止管理员更改此操作.此信息存储在注册表中,因此任何管理员都可以更改.即使您找到了一种方法,管理员也可以删除可执行文件以阻止其运行.如果您在公司环境中,那么建议您坚持使用网络管理员设置.如果是用于商业产品,甚至不用考虑它.
There is nothing you can do to stop an administrator changing this. This info is stored in the registry and therefore can be changed by any administrator. Even if you found a way, an administrator could just delete the executable file to prevent it running. If you are in a corporate environment, then I suggest you stick to your network admin setup. If it is for a commercial product, don''t even think about it.


好吧,他们必须是管理员,并且管理员无所不能.您可能能够监视注册表设置或其他内容,并将其更改为用户更改后的设置,但是,我从未见过执行此操作的服务. Google是您的朋友.
Well, they have to be an admin, and admins are all-powerful. You might be able to monitor registry settings or something and change them back to what they''re supposed to be after the user changes it, however, I''ve never seen a service that did this. Google is your friend.


这篇关于如何防止用户更改Windows Service的启动类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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