仅在启动计算机时启动服务.用户无法启动/停止/重新启动服务. [英] to start the service only when starting the computer. user can not start/stop/restart the service.

查看:77
本文介绍了仅在启动计算机时启动服务.用户无法启动/停止/重新启动服务.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开发了窗口服务.在这种情况下,我只想在启动计算机时启动该服务.用户无法启动/停止/重新启动服务.手动启动计算机时,这些都是手动操作.


锁定用户的所有属性.启动计算机时,所有工作均通过编码完成.

解决方案

阅读这些内容

保护不受信任用户的Windows服务 [高级用户的权力 [ ^ ](也不要忘记阅读评论)

.NET中的访问控制列表编辑 [此处 [ ^ ].它应该可以帮助您设置服务自动启动.


首先,您必须安装服务.请检查上面AbhiNav提供的链接.

然后转到管理(右键单击我的电脑->管理)

选择服务

找到您的服务

打开所选服务的属性

设置启动类型AUTOMATIC

开始服务...

下次服务将自动启动...


i have developed the window service. in this i want to start the service only when starting the computer. user can not start/stop/restart the service.manually these all thing are handle when user start the computer.

or
lock the all properties from the user.all working done by coding when we start the computer.

解决方案

Read these

Protecting a Windows Service from untrusted users[^]

The Power in Power Users[^](Don''t forgot to read the comments too)

Access Control List Editing in .NET[^]


There is a lot of discussion on this here[^]. It should help you setup automatic service startup.


First you have to install the service.. Check above link provided by AbhiNav.

Then go to Manage(Right click my computer-->Manage)

select services

find your service

open properties for selected service

set startup Type AUTOMATIC

start the service...

nexttime service will start automatically...


这篇关于仅在启动计算机时启动服务.用户无法启动/停止/重新启动服务.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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