C sharp windows service
-
Hi, can I make my .net service non disable by changing registry values? Like when a user from administrator group tries to disable service it will give an acess is denied message like Eset Service? Thanks.
-
It is a windows service. I tried this I opened regedit -> Local Machine -> CurrentControlSet -> services ->[My Service name] right click -> permissions and I edited some of the permissions from there finally it's done! When I try to disable the service it gives Access is denied! but I wonder if there is another way to do this? thanks.
-
It is a windows service. I tried this I opened regedit -> Local Machine -> CurrentControlSet -> services ->[My Service name] right click -> permissions and I edited some of the permissions from there finally it's done! When I try to disable the service it gives Access is denied! but I wonder if there is another way to do this? thanks.
Don't think so. You might be able to use something like run as... or impersonate through code when the application is launched so you don't have to do that manually, but I have never tried it. Note that if you run the service as a certain user, that user needs to have access to the resources (if there are resources used). A common mistake eg. is folder access rights.
V.
-
Hi, can I make my .net service non disable by changing registry values? Like when a user from administrator group tries to disable service it will give an acess is denied message like Eset Service? Thanks.
You can't. As an admin, I have full control of the machine. I know that you're not going to accept this as an answer, and you won't believe me. Raymond Chen says the same[^], pointing out how you can "kill" an unkillable proces. Your house, your rules. My machine, my rules.
Bastard Programmer from Hell :suss:
-
You can't. As an admin, I have full control of the machine. I know that you're not going to accept this as an answer, and you won't believe me. Raymond Chen says the same[^], pointing out how you can "kill" an unkillable proces. Your house, your rules. My machine, my rules.
Bastard Programmer from Hell :suss:
Yeah I understand, I don't want to restrict administrators from doing nothing but in our company we give our users admin rights and this is a mistake I know that. We'll get back admin rights from users soon but until that holy day, I made a service that is not non killable but it's really hard to kill or disable or stop it!!! I understand all of u who don't want programmers to restrict administrators from doing something but in some cases like mine I should. Thank all of u for your answers. :)