-2

If you worked with ESET Smart Security or Deep Freeze when you seen when admin want to end process of them he see a Error that says "Access Denied"

How can I protect my C# app from someone killing its

AminM
  • 1,658
  • 4
  • 32
  • 48
ahmadali shafiee
  • 4,350
  • 12
  • 56
  • 91
  • Please when you want to give me -1 say it's reason – ahmadali shafiee Nov 11 '11 at 13:45
  • What is your reason for denying access to close (so we can decide whether it seems legitimate)?. It sounds like you are talking about the "End Process" button in Task Manager; is that right? – Justin Nov 11 '11 at 13:50
  • http://csharptest.net/1043/how-to-prevent-users-from-killing-your-service-process/ – AminM Apr 05 '13 at 09:30

1 Answers1

0

It is not seen as good practice to stop your application from being closed.

See an example of why here

Even if you hide the close button and intercept the alt + f4 keypresses, and handle the exit code of the main form, the user can still force the application to close via task manager.

Community
  • 1
  • 1
seanzi
  • 883
  • 10
  • 24