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. How to deny users from disabling my C# service

How to deny users from disabling my C# service

Scheduled Pinned Locked Moved C#
csharptestingbeta-testinghelptutorial
4 Posts 4 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 everyone, I have a problem, we borrow our clients laptops in our company for a short time. Users should be the local admin of the computer in order to add/remove programs they need. However, some of them didn't return the laptops in time so, we decided to write a program that locks the computer on date that we give before. I have one windows service, one form application which interacts with user and communicates with the service. While I testing, when I kill my program or my service, I give bsod but, when I try to disable the service and restart my computer, it doesn't run anymore. I need a method to prevent disable my service. Even my form application gets killed, my service has to run in background. Thanks.

    J L D 3 Replies Last reply
    0
    • C candogu

      Hi everyone, I have a problem, we borrow our clients laptops in our company for a short time. Users should be the local admin of the computer in order to add/remove programs they need. However, some of them didn't return the laptops in time so, we decided to write a program that locks the computer on date that we give before. I have one windows service, one form application which interacts with user and communicates with the service. While I testing, when I kill my program or my service, I give bsod but, when I try to disable the service and restart my computer, it doesn't run anymore. I need a method to prevent disable my service. Even my form application gets killed, my service has to run in background. Thanks.

      J Offline
      J Offline
      jschell
      wrote on last edited by
      #2

      candogu wrote:

      we borrow our clients laptops in our company for a short time

      Presumably you mean that you lend them to your clients.

      candogu wrote:

      we decided to write a program that locks the computer on date that we give before

      Seems like an unlikely and complicated solution. Why don't you just send them a bill, with an appropriate markup, as the replacement cost of the computer? The markup should be high enough that it allows you to buy a new computer and cover collection agency costs. Presumably the clients are in fact capabable of covering that cost or you shouldn't be lending it to them in the first place.

      candogu wrote:

      I need a method to prevent disable my service

      I am rather certain that is impossible. You can however make it difficult. But really will this fix your problem? Are you sure the clients will return the computer then? What stops them from just throwing it in the trash?

      1 Reply Last reply
      0
      • C candogu

        Hi everyone, I have a problem, we borrow our clients laptops in our company for a short time. Users should be the local admin of the computer in order to add/remove programs they need. However, some of them didn't return the laptops in time so, we decided to write a program that locks the computer on date that we give before. I have one windows service, one form application which interacts with user and communicates with the service. While I testing, when I kill my program or my service, I give bsod but, when I try to disable the service and restart my computer, it doesn't run anymore. I need a method to prevent disable my service. Even my form application gets killed, my service has to run in background. Thanks.

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

        I'd boot in safe mode and install my own "fun.exe" before returning it to you :) While there's few valid reasons to be late in returning the laptop, there's none in locking it. You have a list of people whom you lent it to; send them a mail and charge them a small fee for each day that it's not returned.

        Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

        1 Reply Last reply
        0
        • C candogu

          Hi everyone, I have a problem, we borrow our clients laptops in our company for a short time. Users should be the local admin of the computer in order to add/remove programs they need. However, some of them didn't return the laptops in time so, we decided to write a program that locks the computer on date that we give before. I have one windows service, one form application which interacts with user and communicates with the service. While I testing, when I kill my program or my service, I give bsod but, when I try to disable the service and restart my computer, it doesn't run anymore. I need a method to prevent disable my service. Even my form application gets killed, my service has to run in background. Thanks.

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          Since everyone is an admin, you can't, really.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak

          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