Prevent users from stopping a process

后端 未结 2 1773
深忆病人
深忆病人 2021-01-29 16:31

Long story short, I need to create an application that monitor the sound volume on a computer. The computer\'s user must not be able to stop the application no matter what.

相关标签:
2条回答
  • 2021-01-29 16:51

    I'm not accusing you of malware - just wanted to illustrate how bad it would be if you could easily make a program that the user can "never stop".

    So no you can't make a program that a computer-savvy person could never stop.

    But from what I gathered....

    Sounds like you want to make it a service. https://msdn.microsoft.com/en-us/library/d56de412(v=vs.110).aspx.

    Another (easier I think) option is just to make a console app that starts up from the Task Scheduler http://www.c-sharpcorner.com/uploadfile/manas1/console-application-using-windows-scheduler/.

    0 讨论(0)
  • 2021-01-29 16:58

    In general, the only programs that act like that are malicious (e.g. rootkits). If you think about it, you really wouldn't want programs to be able to act like that.

    As others have indicated, the closest you'll get here is a Windows Service, which automatically starts with Windows. Average users won't know to stop it, but it's still possible to stop it manually for power users.

    One work-around you could try is to periodically have it call a web service to verify that it's running. That way you could tell who might have uninstalled or stopped the service. (The problem, of course, is that they might just not have their computer on or something; you could have separate calls for "Start" and "Still On").

    Alternatively, if this installed only on computers that are exclusively under your direct control, as others have indicated, you could configure things so that you need administrative access to stop the process. This option was addressed in the comments.

    0 讨论(0)
提交回复
热议问题