preventing being closed from task manager [modified]
-
i have a program that uses a process in background for some calculations. is there a way to prevent the process from being closed from task manager? just like antivirus programs that prevent their processes from being closed.
sometimes 0 can be 1
modified on Monday, February 9, 2009 4:23 PM
Noone here is going to tell you how to do that. There is no valid use for it. Any application can potentially become unstable, even if programmed perfectly, and the user MUST be able to close it.
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) -
i have a program that uses a process in background for some calculations. is there a way to prevent the process from being closed from task manager? just like antivirus programs that prevent their processes from being closed.
sometimes 0 can be 1
modified on Monday, February 9, 2009 4:23 PM
That's been asked and answered about a hundred times around here. No, you can't do that with a user application. You can only do that with a Windows Service, but only under certain circumstances.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
Noone here is going to tell you how to do that. There is no valid use for it. Any application can potentially become unstable, even if programmed perfectly, and the user MUST be able to close it.
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) -
i have a program that uses a process in background for some calculations. is there a way to prevent the process from being closed from task manager? just like antivirus programs that prevent their processes from being closed.
sometimes 0 can be 1
modified on Monday, February 9, 2009 4:23 PM
Noone is going to tell you how to do something that is most likely to be used in writing malware.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall
-
of course there must be a way to close the process but i want it to be from the program
sometimes 0 can be 1
What if the program hangs?... It's interesting for academic study only, but no use in the real world to 'end user friendly' developers so give it up.
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) -
Noone is going to tell you how to do something that is most likely to be used in writing malware.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall
-
i have a program that uses a process in background for some calculations. is there a way to prevent the process from being closed from task manager? just like antivirus programs that prevent their processes from being closed.
sometimes 0 can be 1
modified on Monday, February 9, 2009 4:23 PM
i don't understand why some people read the messages just to give unrelated answers. this is a message board and someone asks a question and some people answer to it if the want to. so i f you don't know the answer or don't want to answer just don't do it. noone is going to judge you
sometimes 0 can be 1
-
i don't understand why some people read the messages just to give unrelated answers. this is a message board and someone asks a question and some people answer to it if the want to. so i f you don't know the answer or don't want to answer just don't do it. noone is going to judge you
sometimes 0 can be 1
The only possible answer is to have another process running which checks if your first process was stopped, and restarts it. There is no way to do this, that cannot be defeated. A service can be set to restart itself, as someone else said.
Christian Graus Driven to the arms of OSX by Vista.
-
i have a program that uses a process in background for some calculations. is there a way to prevent the process from being closed from task manager? just like antivirus programs that prevent their processes from being closed.
sometimes 0 can be 1
modified on Monday, February 9, 2009 4:23 PM
Even AV shouldn't do this. Nor FireWalls either. ZoneAlarm crashed on me a couple of time (the bloody TrueVector thing) and it's impossible to do anything but reboot. If you want to use the internet, that is. And who doesn't? So after 3 such crashes I got angry and swore never to let that piece of crap get on any of my computers again. And I'm telling it to anyone who wants to hear it (or not). Would you like people to do that with your program?
-
i have a program that uses a process in background for some calculations. is there a way to prevent the process from being closed from task manager? just like antivirus programs that prevent their processes from being closed.
sometimes 0 can be 1
modified on Monday, February 9, 2009 4:23 PM
It can't be done. And it shouldn't be done. Anyway, I kill antivirus from task manager all the time.
-
The only possible answer is to have another process running which checks if your first process was stopped, and restarts it. There is no way to do this, that cannot be defeated. A service can be set to restart itself, as someone else said.
Christian Graus Driven to the arms of OSX by Vista.