Here is some more clarification on this:
1. It is not necessary for admin. If admin is killing process from task manager then also it is fine. I dont want same behavior to be applicable for administrator.
2. I want to do this in 2 ways
a. Prevent non admin user from stopping service via Service Control Manager(SCM) : This is done...
b. Prevent non admin user from killing service via task manager.
3. I am not having any other intention :-), I will explain it more, then u will realize the actual issue and its urgency.
3. This is needed because my service run onto clients. Its a sort of security service, something like McAfee, Nortan antivirus services. In case of these standard services i am not able to stop them or kill them if i m not administrator. In my case when i install my service then user is killing this service and also he is able to stop it from SCM.
Now this is causing lot of issues for me, this service constantly reports to server once user stops it server will not receive any data from my service (which was running on client). This will result into failed delivery of security updates in between client and server...
Hope this clarifies, please let me know if u want further explanation....
Main Topics
Browse All Topics





by: abelPosted on 2009-06-02 at 01:44:57ID: 24524716
This is a very complex task and requires writing beyond the normal capabilities of services. Without intricate knowledge of both the language in which the service is written (I assume you wrote the service?) and the windows services architecture, I wouldn't go about doing this. You can of course ignore the stop signal, but really preventing an administrator from killing your service is, eventually really impossible. After all, why are they administrators?
Second thought you should consider is that this involves "misbehaving" of your service. Any administrator will recognize that and will uninstall your service.
If you are ill-intentioned (I'm sure you are not) then you can resort to researching holes in the OS. But that is beyond the scope of EE's guidelines to assist you there.
Just tell me, why is this causing you trouble and why is it so urgent? I'd assume that you can do most of it by setting rights on the service and make sure that the users that logon to your server do not have sufficient rights to shutdown a service or change its properties. Which would be a much easier task to accomplish if your users are misbehaving and stopping the service when they are actually not allowed to do so.