Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. C sharp windows service

C sharp windows service

Scheduled Pinned Locked Moved C#
csharpwindows-adminquestion
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    candogu
    wrote on last edited by
    #1

    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.

    V L 2 Replies Last reply
    0
    • C candogu

      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.

      V Offline
      V Offline
      V 0
      wrote on last edited by
      #2

      Are we talking a Web or WCF Service or a windows service?

      V.

      C 1 Reply Last reply
      0
      • V V 0

        Are we talking a Web or WCF Service or a windows service?

        V.

        C Offline
        C Offline
        candogu
        wrote on last edited by
        #3

        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.

        V 1 Reply Last reply
        0
        • C candogu

          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.

          V Offline
          V Offline
          V 0
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0
          • C candogu

            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.

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            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:

            C 1 Reply Last reply
            0
            • L Lost User

              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:

              C Offline
              C Offline
              candogu
              wrote on last edited by
              #6

              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. :)

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups